in reply to Re^2: Better "IPC" method than BDB?
in thread Better "IPC" method than BDB?

Well, how can IPC where ram memory is actually shared between apps be slower? It must be in your implementation or your kernel. I agree though, it can be tricky to use. Read Chapter 5 of ALP

I'm not really a human, but I play one on earth. Cogito ergo sum a bum

Replies are listed 'Best First'.
Re^4: Better "IPC" method than BDB?
by samtregar (Abbot) on May 21, 2007 at 21:56 UTC
    I don't know the real answer but I suspect it has to do with modern file-systems being very well tuned, with fancy memory caches that are actually better than old-school SysV shared memory. For me it doesn't really matter why it's slow unless I expect to fix it. Fixing SysV shared-memory would a complete waste of time, I think!

    -sam

      Fixing SysV shared-memory would a complete waste of time, I think!

      I tend to agree, I've only used it as a learning experience. I tend to go with threads-shared-memory. IIRC SysV shared mem had a nasty habit of not destroying itself automatically, leaving these security gaps if you are not careful. I have seen some patches that address this problem, but threads are my first choice of tool now. I would be willing to bet that SysV shared-mem is faster than threads-shared-mem, if proper tests were done, but if you really need that kind of millisec speed increase, you should write it in c or assembly :-) . Of course, if you have to fork, instead of threading, SysV Shared mem still provides a good way of IPC between forked processes.


      I'm not really a human, but I play one on earth. Cogito ergo sum a bum
        I would be willing to bet that SysV shared-mem is faster than threads-shared-mem

        Really? How much would you bet? I think this could be a money maker for me! SysV shared memory is a lot slower than most people think. IPC::Sharelite is about as fast as using Storable to read and write files on disk!

        -sam