[opensuse] postfix memory usage in 32bit vs 64bit
Just an interesting observation - well, I think it is :-) I run a lot of postfix on both 32bit and 64bit hardware. For testing, I started installing opensuse 64bit version on a couple of new production servers. After a while, I noticed that memory usage had risen sharply - a postfix smtpd daemon would have a memory footprint of virt=27M, res=5M. With a couple of hundred smtpd daemons, that adds up, and I ended up having to add more swap space. These daemons are often just waiting for a timeout, they don't actually do a lot, so they're swapped out. Well, I've now reinstalled the same servers with 32bit openSUSE 11.0, and saw a significant reduction in memory usage. The only difference here is in software, the config is exactly the same. A postfix smtpd daemon now has a memory footprint of virt=5M, res=3M, a lot less than 27M/5M. /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Per Jessen wrote:
Just an interesting observation - well, I think it is :-)
I run a lot of postfix on both 32bit and 64bit hardware. For testing, I started installing opensuse 64bit version on a couple of new production servers. After a while, I noticed that memory usage had risen sharply - a postfix smtpd daemon would have a memory footprint of virt=27M, res=5M. With a couple of hundred smtpd daemons, that adds up, and I ended up having to add more swap space. These daemons are often just waiting for a timeout, they don't actually do a lot, so they're swapped out.
Well, I've now reinstalled the same servers with 32bit openSUSE 11.0, and saw a significant reduction in memory usage. The only difference here is in software, the config is exactly the same. A postfix smtpd daemon now has a memory footprint of virt=5M, res=3M, a lot less than 27M/5M.
It's not just Postfix, have a look at amavisd-new (Opensuse 11.0 x64): vscan 2959 0.0 0.9 174928 78108 ? Ss Oct20 0:01 amavisd vscan 2963 0.0 0.9 175968 77132 ? S Oct20 0:00 amavisd scan 2964 0.0 0.9 176568 78892 ? S Oct20 0:00 amavisd vscan 2965 0.0 0.9 175968 77100 ? S Oct20 0:00 amavisd vscan 2966 0.0 0.9 175968 77012 ? S Oct20 0:00 amavisd vscan 2967 0.0 0.9 175968 77016 ? S Oct20 0:00 amavisd vscan 2968 0.0 0.9 175968 77016 ? S Oct20 0:00 amavisd compared to Opensuse 10.3 32-bit: vscan 3911 0.0 3.2 62468 16684 ? Ss Oct23 0:03 amavisd vscan 10566 0.0 6.1 64144 31936 ? S 03:32 0:01 amavisd vscan 11570 0.0 6.8 65080 35212 ? S 04:11 0:05 amavisd vscan 12591 0.0 6.9 65160 35868 ? S 06:29 0:05 amavisd vscan 12659 0.0 6.8 64692 35524 ? S 06:36 0:06 amavisd vscan 13147 0.0 6.8 64572 35200 ? S 07:46 0:06 amavisd vscan 14026 0.0 3.5 63260 18528 ? S 09:35 0:00 amavisd It's all those libraries that are linked. Try to look at the processes with pmap. It looks as if your entire memory is filled up but shared libraries are the reason that only a part of the memory in the ps output is actually used. The rest is shared libraries that all daemons are sharing, which is only loaded once but ps doesn't care about that, it attributes each process the memory consumption of a shared library. In your case with hundreds of daemons all sharing libraries the real memory consumption should be much less than the output of ps might make you assume. -- Sandy List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Sandy Drobic wrote:
Per Jessen wrote: [snip]
Well, I've now reinstalled the same servers with 32bit openSUSE 11.0, and saw a significant reduction in memory usage. The only difference here is in software, the config is exactly the same. A postfix smtpd daemon now has a memory footprint of virt=5M, res=3M, a lot less than 27M/5M.
[snip]
It's all those libraries that are linked. Try to look at the processes with pmap. It looks as if your entire memory is filled up but shared libraries are the reason that only a part of the memory in the ps output is actually used. The rest is shared libraries that all daemons are sharing, which is only loaded once but ps doesn't care about that, it attributes each process the memory consumption of a shared library.
Hmm, interesting - I wasn't aware of ps working like that.
In your case with hundreds of daemons all sharing libraries the real memory consumption should be much less than the output of ps might make you assume.
Yes it is - a typical system with e.g 300 smtpd daemons would - according to ps/top - consume 300x 27M virtual space in 64bit mode, which is around 8Gb, but the system doesn't have enough physical+virtual memory for that. /Per -- /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (2)
-
Per Jessen
-
Sandy Drobic