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)not-real.geocities.com>
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
100MB.

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

,David Norris

World Wide Web - http://www.geocities.com/CapeCanaveral/Lab/1652/
Illusionary Web - http://illusionary.dyn.ml.org/ <-- 02:00 - 10:00 GMT
Video/Audio Phone - callto:illusionary.dyn.ml.org
Page via mail - 412039@pager.mirabilis.com
ICQ Universal Internet Number - 412039
E-Mail - kg9ae@geocities.com
Received on Sat Jun 20 23:43:43 1998