Skip to main content.
home | support | download

Back to List Archive

RE: [SWISH-E:333] Re: A new search engine for swish-e

From: David Norris <kg9ae(at)>
Date: Sun Jun 21 1998 - 06:34:03 GMT
>> I know, I use it and it's pretty fast, but still with big indices, or
>> with small indices but lots of request, and being CGIs as they are, you
>> could end up, as it's happened to us, with 10 or 12 copies of the index
>> in memory.
>	Are you sure about that?  The mapping parameter specified in
>	the mmap(2) call in file_vector.c is MAP_SHARED that, to my
>	understanding, means that multiple processes will share a
>	mapping of the same file; hence there is at most one copy in
>	memory at any given instant.

I would have to agree.  I am by no means a C expert, though.

I believe that only one copy would physically exist in memory.  It would
appear to be huge if you viewed it with something like top.  Let's say each
process requires 10MB.  If you had 10 processes running, then top would say
that there are 10 processes using 10MB of RAM each.  It would seem logical
that you are using 100MB, but, you really are not.  In reality, each process
may only use a few hundred kilobytes and share the other 9MB+.  So, those 10
processes might be using around 20MB of total RAM instead of the implied

I hope that makes sense.  (Sorry, if it doesn't. I haven't slept for a day
or two ;)

,David Norris

World Wide Web -
Illusionary Web - <-- 02:00 - 10:00 GMT
Video/Audio Phone -
Page via mail -
ICQ Universal Internet Number - 412039
E-Mail -
Received on Sat Jun 20 23:43:43 1998