Per-process memory queries on Redhat 5.3 (32 and 64-bit)
I have two machines (HP DL380's), with 8Gb of RAM each, and Intel Xeon CPU's. One is installed with Redhat 5.3 32-bit with PAE, and the other with RedHat 5.3 64-bit.
I'm doing some testing with regards to the per-process memory limits. I'm running a script which just executes a never-ending loop increasing the size of a variable with each iteration. Script code is...
echo "" > /tmp/output.txt
while [ 1 ]
ps -eo pid,rss,vsize >> /tmp/output.txt
I'm monitoring the ps output generated in the output.txt.
On the 32-bit system, the process ends with the following message...
xrealloc: cannot reallocate 1073741952 bytes (0 bytes allocated)
At the time the process crashes, the ps output shows a Resident Set Size of 1574060kb, and a VSIZE of 2101664.
On the 64-bit machine, the same error is displayed...
xrealloc: cannot reallocate 18446744071562068096 bytes (0 bytes allocated)
and the ps output shows a RSS of 3146768 and a VSIZE of 4260432.
Therefore, the 32-bit machine can only address 1.5Gb per process of Physical RAM before the process exits. I was under the impression that this should be greater?
The 64-bit machine can only address 3Gb of physical RAM per process. I was under the impression that this should be MUCH higher?
Furethermore, whilst this script was running, I was periodically running 'free -om', which always showed that swap wasn't being used at all. I would of expected swap to be filling up with this script running.
Can anyone explain what's going on here, or am I completly on the wrong track?
Thanks in advance.
The VSIZE is 2GB. A 32 bit Linux kernel can be configured to limit processes to 2GB virtual, but I don't think your kernel is configured that way. I think you could use 3GB virtual.
But maybe it is a bug in the code that actually tried to do the reallocate.
Either way, it appears someone wrote some code for 32 bit and someone recompiled it for 64 bit without testing for places in the code that assumed 32 bit.
1) You have a limit of 3GB of virtual address space.
2) That filled up with just 2GB of virtual memory because the program asked for more in too large a virtual chunk.
3) That occupied only 1.5GB of actual memory for various reasons.
You need to read this http://kbase.redhat.com/faq/docs/DOC-6571 and possibly follow some of the links as well.
|All times are GMT -5. The time now is 07:22 PM.|