Re: out of virtual shared memory
Posted in 1996
In article <53bidq$gqf@cssun.mathcs.emory.edu>, mailgw!hpx400!Trevisol_R
oberto/bbb_cak@srv3-poa.nutecnet.com.br writes
>>In article <530p0d$o12@cssun.mathcs.emory.edu>,
>>Ralph.Halter@pac.panmail.com writes
>>>Hi all!
>>>
>
>>>When I saw this message today I checked with onstat -g seg and saw that
>>>we have the following segments
>>>id key addr size ovhd class blkused blkfree
>>>98305 1381451777 30000000 70541312 1880 R 8607 4
>> Resident segment size is segment 70MB, this is for fixed size tables
>> and mainly dependent on the number of BUFFERS configured.
>>
>>>98306 1381451778 40000000 30720000 1064 V 2529 1221
>>
>> One vritual segment.
>>>77827 1381451779 50000000 557056 604 M 65 3
>>
>> One message segment used to send messages to/from client, size not
>> configurable.
>
>... Not completely true...
Sorry, I meant you cannot set the inital/next segment sizes - you
always just get one segment.
>Message segment size is determined by onconfig
>NETTYPE parameter. When you configure your Online instance for accepting
>connections via Shared Memory (ipcshm), the amount of memory allocated for this
>purpose is about 10-12 Kb multiplied by the number of poll threads multiplied
>by the number of threads. For example, consider following (I have this
>configuration on my Sequent machine):
>
> NETTYPE ipcshm,3,600,NET>
>Three segments (equal to poll threads!) of 6,373,376 bytes of shared memory are
>allocated.
>
>The surprising fact to me was that (apparently... My thoughts...) each poll
>thread allocate its own message buffer (I couldn't find in the manuals...). I'd
>like to hear comments on this ...
>>
>[sniped]
>>
>> Limiting the amount of shared memory using SHMTOTAL is rarely a good
>>idea. THings will start to fail once SHMTOTAL is reached. Why have
>>things fail when the swap space is available to let them succeed. OK
>>they will run slowly but surely that is better than them failing.
>
>Why things fail when SHMTOTAL is reached?
When sorting the memory used is allocate dynamically and so if
SHMTOTAL is reached the required shared memory cannot be allocated.
I got sort failure and cannot allocate memory errors when SHMTOTAL
was reached. Also I've seen page cleaners fail since they could not
allocate shared memory dynamically. Also PQS dynamically allocates
shared memory so PDQ queries would fail.
>... Limiting Informix shared memory may be a good idea when you share memory
>between Informix and an application.
But what if Informix needs more shared memory and memory is available
but because SHMTOTAL is set it cannot use it and so queries will start
to fail. If the memory is there why set SHMTOTAL and stop Informix
from using it?
>Informix tech support told me SHMTOTAL must be defined in 8 Kb increments...
>Anyone else can confirm that?
>
My Online Admin Guide Version 7.1 Volume 2 Page 38-57 says
range of values n>=0
Units Kilobytes
It says nothign about increments but I would not be suprised - most
machines have memory in the megabytes range so SHMTOTAL I'd expect
users to set it to the nearest Mb or 256K on small machines. I'll
try it on my test instance at work tomorrow...once I get whoever
took my entry out of /etc/services to put it back...
>HTH.
>
>Roberto Trevisol
>Banco Bamerindus
>
>
--
David Williams