I'm helping some folks who have a CentOS 3 i386 server with 512MB of RAM. The output of 'free' looks like:
$ free total used free shared buffers cached Mem: 511428 497956 13472 0 29868 178280 -/+ buffers/cache: 289808 221620 Swap: 2040244 120644 1919600
The box does not even have X installed... it's basically a web application and email server. They would like to upgrade to CentOS 4, but are concerned that it could be considerably more "memory hungry" and lead to memory starvation (they don't want to add more RAM to the box at this time, although that could be an option down the road).
I ran some tests under VMWare with fresh installations of CentOS 3 and CentOS 4 (both using a "minimal install", the same as the server in question) and CentOS 4 seemed to only use 10-25MB more memory. However, it's hard to know how this will translate into real-world performance over time and with the application installed.
Does anyone have any experience that would suggest how much more memory a non-X server like this might require? If the application(s) on the server stay the same, do you think we would run into issues where memory would be depleted to a level that would cause concern?
Many thanks, KC
On Thu, 2007-02-08 at 22:33 -0500, hkclark@gmail.com wrote:
I'm helping some folks who have a CentOS 3 i386 server with 512MB of RAM. The output of 'free' looks like:
$ free total used free shared buffers cached Mem: 511428 497956 13472 0 29868 178280 -/+ buffers/cache: 289808 221620 Swap: 2040244 120644 1919600
The box does not even have X installed... it's basically a web application and email server. They would like to upgrade to CentOS 4, but are concerned that it could be considerably more "memory hungry" and lead to memory starvation (they don't want to add more RAM to the box at this time, although that could be an option down the road).
I ran some tests under VMWare with fresh installations of CentOS 3 and CentOS 4 (both using a "minimal install", the same as the server in question) and CentOS 4 seemed to only use 10-25MB more memory. However, it's hard to know how this will translate into real-world performance over time and with the application installed.
Does anyone have any experience that would suggest how much more memory a non-X server like this might require? If the application(s) on the server stay the same, do you think we would run into issues where memory would be depleted to a level that would cause concern?
It should not be a problem as lots of your memory used is buffers and cache.
CentOS-3 is going to be supported for a while yet (EOL is scheduled for Oct 31, 2010), so if it is working perfectly and doing what they want, they may want to keep it though.
If they upgrade or don't, the memory should be OK either way .
On 2/8/07, Johnny Hughes mailing-lists@hughesjr.com wrote:
It should not be a problem as lots of your memory used is buffers and cache.
CentOS-3 is going to be supported for a while yet (EOL is scheduled for Oct 31, 2010), so if it is working perfectly and doing what they want, they may want to keep it though.
If they upgrade or don't, the memory should be OK either way .
Hi Johnny,
Good info -- thanks. They have a small app they want to add that requires a newer version of Perl than 5.8.0 that comes with CentOS 3. Rather than getting into a non-RPM version of Perl, we were thinking going to CentOS 4 would be easier and cleaner.
In your experience, would you say that my "quick & dirty" measurement of CentOS 4 needing 10-25 MB more memory than CentOS 3 (again, for a non-X box with a minimal install) is accurate (at least in approximate terms)? Or is there something I'm not taking into account -- e.g, some of the libraries and/or other "basic server apps" such as apache with PHP or MySQL will make that number much higher? Although this box is doing OK on memory now, I would hate to kill their possible expansion plans just because we did an upgrade and it sucked up way more memory than we though.
Again, thanks for all the great things you and the CentOS team are doing!
Regards, KC
hkclark@gmail.com wrote:
On 2/8/07, Johnny Hughes mailing-lists@hughesjr.com wrote:
It should not be a problem as lots of your memory used is buffers and cache.
CentOS-3 is going to be supported for a while yet (EOL is scheduled for Oct 31, 2010), so if it is working perfectly and doing what they want, they may want to keep it though.
If they upgrade or don't, the memory should be OK either way .
Hi Johnny,
Good info -- thanks. They have a small app they want to add that requires a newer version of Perl than 5.8.0 that comes with CentOS 3. Rather than getting into a non-RPM version of Perl, we were thinking going to CentOS 4 would be easier and cleaner.
In your experience, would you say that my "quick & dirty" measurement of CentOS 4 needing 10-25 MB more memory than CentOS 3 (again, for a non-X box with a minimal install) is accurate (at least in approximate terms)? Or is there something I'm not taking into account -- e.g, some of the libraries and/or other "basic server apps" such as apache with PHP or MySQL will make that number much higher? Although this box is doing OK on memory now, I would hate to kill their possible expansion plans just because we did an upgrade and it sucked up way more memory than we though.
Again, thanks for all the great things you and the CentOS team are doing!
Here is the output of "free" for 2 identical systems that happen to be running CentOS3 and CentOS4. The only difference is the CentOS4 system has 2GB RAM vs 1GB in the CentOS3 system.
The CentOS3 system shows:
total used free shared buffers cached Mem: 1024292 660572 363720 0 102612 397072 -/+ buffers/cache: 160888 863404 Swap: 2104464 0 2104464
CentOS4 shows:
total used free shared buffers cached Mem: 2074928 2030412 44516 0 276628 1365792 -/+ buffers/cache: 387992 1686936 Swap: 2104464 144 2104320
As others have noted, a lot of the free RAM is just gobbled up as buffers and cache. As needed, the system will reallocate that memory so that your fancy perl application can get at it. :)
Call me crazy, but I don't understand the agonizing fork in the decision tree here. RAM is ridiculously cheap. Why not just upgrade to 1GB while you're doing the 3-->4 upgrade? I suspect it isn't really needed, but it will add minimal cost to the operation (certainly much less than the cost of your time to accomplish the software update and test the new system).
Cheers,
On Fri, 2007-02-09 at 06:51 -0500, chrism@imntv.com wrote:
hkclark@gmail.com wrote:
On 2/8/07, Johnny Hughes mailing-lists@hughesjr.com wrote:
It should not be a problem as lots of your memory used is buffers and cache.
CentOS-3 is going to be supported for a while yet (EOL is scheduled for Oct 31, 2010), so if it is working perfectly and doing what they want, they may want to keep it though.
If they upgrade or don't, the memory should be OK either way .
Hi Johnny,
Good info -- thanks. They have a small app they want to add that requires a newer version of Perl than 5.8.0 that comes with CentOS 3. Rather than getting into a non-RPM version of Perl, we were thinking going to CentOS 4 would be easier and cleaner.
In your experience, would you say that my "quick & dirty" measurement of CentOS 4 needing 10-25 MB more memory than CentOS 3 (again, for a non-X box with a minimal install) is accurate (at least in approximate terms)? Or is there something I'm not taking into account -- e.g, some of the libraries and/or other "basic server apps" such as apache with PHP or MySQL will make that number much higher? Although this box is doing OK on memory now, I would hate to kill their possible expansion plans just because we did an upgrade and it sucked up way more memory than we though.
Again, thanks for all the great things you and the CentOS team are doing!
Here is the output of "free" for 2 identical systems that happen to be running CentOS3 and CentOS4. The only difference is the CentOS4 system has 2GB RAM vs 1GB in the CentOS3 system.
The CentOS3 system shows:
total used free shared buffers cached
Mem: 1024292 660572 363720 0 102612 397072 -/+ buffers/cache: 160888 863404 Swap: 2104464 0 2104464
CentOS4 shows:
total used free shared buffers cached
Mem: 2074928 2030412 44516 0 276628 1365792 -/+ buffers/cache: 387992 1686936 Swap: 2104464 144 2104320
As others have noted, a lot of the free RAM is just gobbled up as buffers and cache. As needed, the system will reallocate that memory so that your fancy perl application can get at it. :)
Call me crazy, but I don't understand the agonizing fork in the decision tree here. RAM is ridiculously cheap. Why not just upgrade to 1GB while you're doing the 3-->4 upgrade? I suspect it isn't really needed, but it will add minimal cost to the operation (certainly much less than the cost of your time to accomplish the software update and test the new system).
RAM is indeed very cheep ... and having 1gb should be easy, I agree with chris.
I also agree that as long as you have 200 mb free (as in your initial post) that you should not have any problem shifting to CentOS-4.
When you use free ... anything that is in buffers and cache should be subtracted if you really want to know how much (REAL/HARD) memory is in use.
This is because the linux kernel fills up to the max all it's memory by design. If you are not using it, it will cache stuff there. The theory is that if you need that cached data again, it will be available in memory and that you can switch out the buffers / cache cheaply when you really need the memory.
So, in your initial post you had this:
total used free shared buffers cached Mem: 511428 497956 13472 0 29868 178280
That means, I would call your hard memory used:
511428 - (29868+178280) = 303280
So ... moving from CentOS-3 to CentOS-4 should not be a major issue on that machine.
(In your Centos-4 VM, subtract buffers/cache from used and see how that looks)
Some of our CentOS machines have 512mb (they are donated machines and we can't MAKE them have more memory). They work OK and serve between 1600 GB and 3200 GB per month via rsync and httpd, so certainly a web server (if java is not involved :P) CAN work OK with 512mb RAM. 1 GB would be MUCH better though.
Thanks, Johnny Hughes
Johnny Hughes wrote:
Some of our CentOS machines have 512mb (they are donated machines and we can't MAKE them have more memory). They work OK and serve between 1600 GB and 3200 GB per month via rsync and httpd, so certainly a web server (if java is not involved :P) CAN work OK with 512mb RAM. 1 GB would be MUCH better though.
And if you're working with such a limited server, be sure to tune down your httpd binary:
a) throw out all modules from the configuration that you do not need (and there are normally only a few modules which are really needed in day to day use)
b) watch your server while it is running and try to find a working balance for you regarding max-clients (too few and you'll lock people out, too many and your system will start swapping and be generally unresponsive to http requests).
Ralph
On 2/9/07, Johnny Hughes mailing-lists@hughesjr.com wrote:
On Fri, 2007-02-09 at 06:51 -0500, chrism@imntv.com wrote:
<snip>
Call me crazy, but I don't understand the agonizing fork in the decision tree here. RAM is ridiculously cheap. Why not just upgrade to 1GB while you're doing the 3-->4 upgrade? I suspect it isn't really needed, but it will add minimal cost to the operation (certainly much less than the cost of your time to accomplish the software update and test the new system).
RAM is indeed very cheep ... and having 1gb should be easy, I agree with chris.
I also agree that as long as you have 200 mb free (as in your initial post) that you should not have any problem shifting to CentOS-4.
When you use free ... anything that is in buffers and cache should be subtracted if you really want to know how much (REAL/HARD) memory is in use.
This is because the linux kernel fills up to the max all it's memory by design. If you are not using it, it will cache stuff there. The theory is that if you need that cached data again, it will be available in memory and that you can switch out the buffers / cache cheaply when you really need the memory.
So, in your initial post you had this:
total used free shared buffers cached
Mem: 511428 497956 13472 0 29868 178280
That means, I would call your hard memory used:
511428 - (29868+178280) = 303280
So ... moving from CentOS-3 to CentOS-4 should not be a major issue on that machine.
(In your Centos-4 VM, subtract buffers/cache from used and see how that looks)
Some of our CentOS machines have 512mb (they are donated machines and we can't MAKE them have more memory). They work OK and serve between 1600 GB and 3200 GB per month via rsync and httpd, so certainly a web server (if java is not involved :P) CAN work OK with 512mb RAM. 1 GB would be MUCH better though.
Thanks, Johnny Hughes
Johnny & Chris,
Good point. I should have been more clear about the "artificial constraint" on the memory (but I left it out since it's not my server and I'm not 100% sure of the background). They have some sort of a multi-year hosting deal at favorable prices on the existing box, but if they make a RAM upgrade, the price goes way up (I'm not sure, but it might require an entirely new agreement).
Johnny, One question re the "hard memory used" math just be be sure I'm not reading the output of free wrong (since that's entirely possible). Wouldn't the hard memory calcs essentially be what free shows on the "-/+ buffers/cache:" line? IOW, I'm thinking the "memory used by the apps" would be the used # on the first line (497,956) with the amount in buffers in cache removed because it's available for apps if necessary: 497,956 - (29,868 + 178,280) = 289,808 (with the difference being the 'free' RAM on the first line, 13,472). Sorry if I'm being dense and not looking at it right.
Thanks! KC
On Fri, 2007-02-09 at 09:20 -0500, hkclark@gmail.com wrote:
On 2/9/07, Johnny Hughes mailing-lists@hughesjr.com wrote:
On Fri, 2007-02-09 at 06:51 -0500, chrism@imntv.com wrote:
<snip> > > > > Call me crazy, but I don't understand the agonizing fork in the decision > > tree here. RAM is ridiculously cheap. Why not just upgrade to 1GB > > while you're doing the 3-->4 upgrade? I suspect it isn't really needed, > > but it will add minimal cost to the operation (certainly much less than > > the cost of your time to accomplish the software update and test the new > > system). > > > > RAM is indeed very cheep ... and having 1gb should be easy, I agree with > chris. > > I also agree that as long as you have 200 mb free (as in your initial > post) that you should not have any problem shifting to CentOS-4. > > When you use free ... anything that is in buffers and cache should be > subtracted if you really want to know how much (REAL/HARD) memory is in > use. > > This is because the linux kernel fills up to the max all it's memory by > design. If you are not using it, it will cache stuff there. The theory > is that if you need that cached data again, it will be available in > memory and that you can switch out the buffers / cache cheaply when you > really need the memory. > > So, in your initial post you had this: > > total used free shared buffers cached > Mem: 511428 497956 13472 0 29868 178280 > > That means, I would call your hard memory used: > > 511428 - (29868+178280) = 303280 > > So ... moving from CentOS-3 to CentOS-4 should not be a major issue on > that machine. > > (In your Centos-4 VM, subtract buffers/cache from used and see how that > looks) > > Some of our CentOS machines have 512mb (they are donated machines and we > can't MAKE them have more memory). They work OK and serve between 1600 > GB and 3200 GB per month via rsync and httpd, so certainly a web server > (if java is not involved :P) CAN work OK with 512mb RAM. 1 GB would be > MUCH better though. > > Thanks, > Johnny Hughes
Johnny & Chris,
Good point. I should have been more clear about the "artificial constraint" on the memory (but I left it out since it's not my server and I'm not 100% sure of the background). They have some sort of a multi-year hosting deal at favorable prices on the existing box, but if they make a RAM upgrade, the price goes way up (I'm not sure, but it might require an entirely new agreement).
Johnny, One question re the "hard memory used" math just be be sure I'm not reading the output of free wrong (since that's entirely possible). Wouldn't the hard memory calcs essentially be what free shows on the "-/+ buffers/cache:" line? IOW, I'm thinking the "memory used by the apps" would be the used # on the first line (497,956) with the amount in buffers in cache removed because it's available for apps if necessary: 497,956 - (29,868 + 178,280) = 289,808 (with the difference being the 'free' RAM on the first line, 13,472). Sorry if I'm being dense and not looking at it right.
You are correct ... I should have used the 497,956 (or subtracted free memory too).
And yes ... the used number in the second line is the correct value to use for REAL used mem. It is:
Total - (Free + Buffers + Cache)
That is the number to compare ... I was trying (unsucessfully :P) to show you where it came from :)
Thanks, Johnny Hughes
Cool. Mucho thanks for the clarification.
KC
On 2/9/07, Johnny Hughes mailing-lists@hughesjr.com wrote:
You are correct ... I should have used the 497,956 (or subtracted free memory too).
And yes ... the used number in the second line is the correct value to use for REAL used mem. It is:
Total - (Free + Buffers + Cache)
That is the number to compare ... I was trying (unsucessfully :P) to show you where it came from :)
Thanks, Johnny Hughes
Gents, am I reading this information incorrectly, or is this box also swapping about 128M? Swapping will quickly grind your system to a halt.
I guess this all depends on how many people are connecting to your apache servers... Turn on your server-info and see :)
Vasiliy Boulytchev vasiliy@linuxspecial.com
hkclark@gmail.com wrote:
Cool. Mucho thanks for the clarification.
KC
On 2/9/07, Johnny Hughes mailing-lists@hughesjr.com wrote:
You are correct ... I should have used the 497,956 (or subtracted free memory too).
And yes ... the used number in the second line is the correct value to use for REAL used mem. It is:
Total - (Free + Buffers + Cache)
That is the number to compare ... I was trying (unsucessfully :P) to show you where it came from :)
Thanks, Johnny Hughes
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 2/9/07, Vasiliy Boulytchev vasiliy@linuxspecial.com wrote:
Gents, am I reading this information incorrectly, or is this box also swapping about 128M? Swapping will quickly grind your system to a halt.
I guess this all depends on how many people are connecting to your apache servers... Turn on your server-info and see :)
Vasiliy Boulytchev vasiliy@linuxspecial.com
Hmmm, now that you mention it, that's a very good point. Does anyone out there know why CentOS 3 would swap out so much vs. "giving back real RAM" from buffers and/or cache? I agree with Vasiliy that it looks like the performance on this box could be pretty lame if anything important is in that swap (I would assume the OS is putting the "oldest" stuff in swap, but what if an app didn't need to get used very often and it suddenly received a request... that request could easily time out while stuff is swapping back in from disk, right?). Does anyone know a good way to see which app(s) and/or parts of the OS/libs are being put into swap vs. kept in "real RAM"?
Regards, KC
On 2/9/07, hkclark@gmail.com hkclark@gmail.com wrote:
On 2/9/07, Vasiliy Boulytchev vasiliy@linuxspecial.com wrote:
Gents, am I reading this information incorrectly, or is this box also swapping about 128M? Swapping will quickly grind your system to a halt.
I guess this all depends on how many people are connecting to your apache servers... Turn on your server-info and see :)
Vasiliy Boulytchev vasiliy@linuxspecial.com
Hmmm, now that you mention it, that's a very good point. Does anyone out there know why CentOS 3 would swap out so much vs. "giving back real RAM" from buffers and/or cache? I agree with Vasiliy that it looks like the performance on this box could be pretty lame if anything important is in that swap (I would assume the OS is putting the "oldest" stuff in swap, but what if an app didn't need to get used very often and it suddenly received a request... that request could easily time out while stuff is swapping back in from disk, right?). Does anyone know a good way to see which app(s) and/or parts of the OS/libs are being put into swap vs. kept in "real RAM"?
Regards, KC
PS -- To partially reply to my own post, a few moments after I hit send (doh! doesn't that always happen!), I remembered reading a while back some info on the "swappiness" setting in 2.6 kernels. I know I saved some links to the stuff I was reading, but of course I can't find those links now to save my life! :-( Here is one of them (there are also threads re swappiness in the archives for this list): http://kerneltrap.org/node/3000
But, if I'm not mistaken, this is all a 2.6 kernel (CentOS 4) thing, so you can't adjust it in CentOS 3. Therefore, I guess one answer to my question is "2.4 kernels have some baked in swappiness value that you can't adjust, so it is what it is"... however, if anyone has other insights on how to maximize performance and swap vs. real mem on CentOS 3 boxes, I'm all ears.
Thanks, KC
hkclark@gmail.com wrote:
On 2/9/07, Vasiliy Boulytchev vasiliy@linuxspecial.com wrote:
Gents, am I reading this information incorrectly, or is this box also swapping about 128M? Swapping will quickly grind your system to a halt.
I guess this all depends on how many people are connecting to your apache servers... Turn on your server-info and see :)
Vasiliy Boulytchev vasiliy@linuxspecial.com
Hmmm, now that you mention it, that's a very good point. Does anyone out there know why CentOS 3 would swap out so much vs. "giving back real RAM" from buffers and/or cache? I agree with Vasiliy that it looks like the performance on this box could be pretty lame if anything important is in that swap (I would assume the OS is putting the "oldest" stuff in swap, but what if an app didn't need to get used very often and it suddenly received a request... that request could easily time out while stuff is swapping back in from disk, right?). Does anyone know a good way to see which app(s) and/or parts of the OS/libs are being put into swap vs. kept in "real RAM"?
I haven't seen anything like the correct answer yet; as always, it's "It depends."
What applications are running, and what are they doing?
The RAM used by the OS itself is overhead, pure and simple. The important RAM is what's being used to process the workload.
If you're using mysql, postgresql, Apache, those are all using RAM, and the new versions may use more:-)
Or less, depending.
The new version of Perl could have some impact too, and the new application certainly will. So will increasing business.
I don't want the answers to those qs, but you need them (and probably more besides). Then analyse the data and draw conclusions.
Or just, "Stuff it, we'll do it and fix it later." This may be the cheapest.
i moved away from Red Hat 2.4x kernels as they have an annoying tendency to swap instead of giving back cache. I moved to Centos-4 and i have vm.swappiness to zero and am using at most 144K of swap across 5 machines.
John Summerfield wrote:
hkclark@gmail.com wrote:
On 2/9/07, Vasiliy Boulytchev vasiliy@linuxspecial.com wrote:
Gents, am I reading this information incorrectly, or is this box also swapping about 128M? Swapping will quickly grind your system to a halt.
I guess this all depends on how many people are connecting to your apache servers... Turn on your server-info and see :)
Vasiliy Boulytchev vasiliy@linuxspecial.com
Hmmm, now that you mention it, that's a very good point. Does anyone out there know why CentOS 3 would swap out so much vs. "giving back real RAM" from buffers and/or cache? I agree with Vasiliy that it looks like the performance on this box could be pretty lame if anything important is in that swap (I would assume the OS is putting the "oldest" stuff in swap, but what if an app didn't need to get used very often and it suddenly received a request... that request could easily time out while stuff is swapping back in from disk, right?). Does anyone know a good way to see which app(s) and/or parts of the OS/libs are being put into swap vs. kept in "real RAM"?
I haven't seen anything like the correct answer yet; as always, it's "It depends."
What applications are running, and what are they doing?
The RAM used by the OS itself is overhead, pure and simple. The important RAM is what's being used to process the workload.
If you're using mysql, postgresql, Apache, those are all using RAM, and the new versions may use more:-)
Or less, depending.
The new version of Perl could have some impact too, and the new application certainly will. So will increasing business.
I don't want the answers to those qs, but you need them (and probably more besides). Then analyse the data and draw conclusions.
Or just, "Stuff it, we'll do it and fix it later." This may be the cheapest.
William Warren wrote:
i moved away from Red Hat 2.4x kernels as they have an annoying tendency to swap instead of giving back cache. I moved to Centos-4 and i have vm.swappiness to zero and am using at most 144K of swap across 5 machines.
I should have mentioned that every time I compare a 2.6 kernel with RHL 7.3 on this test: hdparm -t /dev/hda
RHL is always faster. I was also running some other tests involving bonnie{,++} where RHL was still looking good, then Google interevened.
Known problem.
It was a year or so ago, maybe it's fixed.
I said i moved away form Red Hat 2.4x kernels due to the memory issues. I use Red Hat 2.6x kernels now as they seems to behave properly in regards to swap. I have seen it way too many times with RH 2.4x kernels on many many machines.
John Summerfield wrote:
William Warren wrote:
i moved away from Red Hat 2.4x kernels as they have an annoying tendency to swap instead of giving back cache. I moved to Centos-4 and i have vm.swappiness to zero and am using at most 144K of swap across 5 machines.
I should have mentioned that every time I compare a 2.6 kernel with RHL 7.3 on this test: hdparm -t /dev/hda
RHL is always faster. I was also running some other tests involving bonnie{,++} where RHL was still looking good, then Google interevened.
Known problem.
It was a year or so ago, maybe it's fixed.
William Warren wrote:
i moved away from Red Hat 2.4x kernels as they have an annoying tendency to swap instead of giving back cache. I moved to Centos-4 and i have vm.swappiness to zero and am using at most 144K of swap across 5 machines.
Did you see any real-world improvement from this? The kernel may be right in swapping out little-used parts of memory to release RAM for something more likely to be active.
yes i did. The 2.4x Rh kernels actually aren't right in their swapping behavior. it really nailed my samba server here at the house and caused massive swapping and load issues on a friend's gaming server. i don't know what it is about RH's 2.4x kernels but they swap and won't give the cache memory back. I have more than 6 ipcop firewalls based on 2.4 kernels(not RH) and they won't swap unless you actually exhaust physical memory. The issue is the RH 2.4x kernels which for some reason continue to swap even with 500 MEGS of cache memory available to take back. 2.6x runs much better and actually obeys the swappiness commands. Even the various patches done by Rh on the 2.4x kernel never reduces this behavior.
Les Mikesell wrote:
William Warren wrote:
i moved away from Red Hat 2.4x kernels as they have an annoying tendency to swap instead of giving back cache. I moved to Centos-4 and i have vm.swappiness to zero and am using at most 144K of swap across 5 machines.
Did you see any real-world improvement from this? The kernel may be right in swapping out little-used parts of memory to release RAM for something more likely to be active.
-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org]On Behalf Of William Warren Sent: Saturday, February 10, 2007 11:19 AM To: CentOS mailing list Subject: Re: [CentOS] CentOS 3 vs. CentOS 4 Memory Utilization
yes i did. The 2.4x Rh kernels actually aren't right in their swapping behavior. it really nailed my samba server here at the house and caused massive swapping and load issues on a friend's gaming server. i don't know what it is about RH's 2.4x kernels but they swap and won't give the cache memory back. I have more than 6 ipcop firewalls based on 2.4 kernels(not RH) and they won't swap unless you actually exhaust physical memory. The issue is the RH 2.4x kernels which for some reason continue to swap even with 500 MEGS of cache memory available to take back. 2.6x runs much better and actually obeys the swappiness commands. Even the various patches done by Rh on the 2.4x kernel never reduces this behavior.
Les Mikesell wrote:
William Warren wrote:
i moved away from Red Hat 2.4x kernels as they have an annoying tendency to swap instead of giving back cache. I moved to Centos-4 and i have vm.swappiness to zero and am using at most 144K of swap across 5 machines.
Did you see any real-world improvement from this? The kernel may be right in swapping out little-used parts of memory to release RAM for something more likely to be active.
William Warren wrote:
yes i did. The 2.4x Rh kernels actually aren't right in their swapping behavior. it really nailed my samba server here at the house and caused massive swapping and load issues on a friend's gaming server. i don't know what it is about RH's 2.4x kernels but they swap and won't give the cache memory back. I have more than 6 ipcop firewalls based on 2.4 kernels(not RH) and they won't swap unless you actually exhaust physical memory. The issue is the RH 2.4x kernels which for some reason continue to swap even with 500 MEGS of cache memory available to take back. 2.6x runs much better and actually obeys the swappiness commands. Even the various patches done by Rh on the 2.4x kernel never reduces this behavior.
I don't think I've seen that. Here is a 'top' from an RH7.3 box whose uptime counter has rolled a couple of times so it has actually been running several years.
10:57am up 317 days, 6:56, 6 users, load average: 0.07, 0.10, 0.09 213 processes: 210 sleeping, 2 running, 0 zombie, 1 stopped CPU states: 5.1% user, 2.9% system, 0.0% nice, 91.8% idle Mem: 2065404K av, 1988360K used, 77044K free, 0K shrd, 570124K buff Swap: 1331128K av, 204848K used, 1126280K free 1158784K cached
That doesn't seem that bad and it's a 2.4.20-18.7 kernel. It's not very busy now because it is a weekend. I never see a lot of swap-in happening even when it is busy.
cent-3 is RH9 based. Maybe they've fixed it..but after 1 year of screwing around i went with cent-4 and it's 2.6 kernel and never had any issues since that time.
Les Mikesell wrote:
William Warren wrote:
yes i did. The 2.4x Rh kernels actually aren't right in their swapping behavior. it really nailed my samba server here at the house and caused massive swapping and load issues on a friend's gaming server. i don't know what it is about RH's 2.4x kernels but they swap and won't give the cache memory back. I have more than 6 ipcop firewalls based on 2.4 kernels(not RH) and they won't swap unless you actually exhaust physical memory. The issue is the RH 2.4x kernels which for some reason continue to swap even with 500 MEGS of cache memory available to take back. 2.6x runs much better and actually obeys the swappiness commands. Even the various patches done by Rh on the 2.4x kernel never reduces this behavior.
I don't think I've seen that. Here is a 'top' from an RH7.3 box whose uptime counter has rolled a couple of times so it has actually been running several years.
10:57am up 317 days, 6:56, 6 users, load average: 0.07, 0.10, 0.09 213 processes: 210 sleeping, 2 running, 0 zombie, 1 stopped CPU states: 5.1% user, 2.9% system, 0.0% nice, 91.8% idle Mem: 2065404K av, 1988360K used, 77044K free, 0K shrd, 570124K buff Swap: 1331128K av, 204848K used, 1126280K free 1158784K cached
That doesn't seem that bad and it's a 2.4.20-18.7 kernel. It's not very busy now because it is a weekend. I never see a lot of swap-in happening even when it is busy.
On 2/9/07, hkclark@gmail.com hkclark@gmail.com wrote:
On 2/8/07, Johnny Hughes mailing-lists@hughesjr.com wrote:
It should not be a problem as lots of your memory used is buffers and cache.
CentOS-3 is going to be supported for a while yet (EOL is scheduled for Oct 31, 2010), so if it is working perfectly and doing what they want, they may want to keep it though.
If they upgrade or don't, the memory should be OK either way .
Hi Johnny,
Good info -- thanks. They have a small app they want to add that requires a newer version of Perl than 5.8.0 that comes with CentOS 3. Rather than getting into a non-RPM version of Perl, we were thinking going to CentOS 4 would be easier and cleaner.
In your experience, would you say that my "quick & dirty" measurement of CentOS 4 needing 10-25 MB more memory than CentOS 3 (again, for a non-X box with a minimal install) is accurate (at least in approximate
It is more true that the 2.4.20+stuff kernel (RHEL-3) and the 2.6.9+stuff kernel (RHEL-4) allocate buffers differently, and in some ways count free/buffered memory different.
On Thu, 2007-02-08 at 22:33 -0500, hkclark@gmail.com wrote:
I'm helping some folks who have a CentOS 3 i386 server with 512MB of RAM. The output of 'free' looks like:
$ free total used free shared buffers cached Mem: 511428 497956 13472 0 29868 178280 -/+ buffers/cache: 289808 221620 Swap: 2040244 120644 1919600
The box does not even have X installed... it's basically a web application and email server. They would like to upgrade to CentOS 4, but are concerned that it could be considerably more "memory hungry" and lead to memory starvation (they don't want to add more RAM to the box at this time, although that could be an option down the road).
I ran some tests under VMWare with fresh installations of CentOS 3 and CentOS 4 (both using a "minimal install", the same as the server in question) and CentOS 4 seemed to only use 10-25MB more memory. However, it's hard to know how this will translate into real-world performance over time and with the application installed.
Does anyone have any experience that would suggest how much more memory a non-X server like this might require? If the application(s) on the server stay the same, do you think we would run into issues where memory would be depleted to a level that would cause concern?
--- I wouldn't think so, this system actually does have some x-stuff installed.
# cat /etc/redhat-release CentOS release 4.4 (Final)
# free total used free shared buffers cached Mem: 515604 509760 5844 0 37832 117296 -/+ buffers/cache: 354632 160972 Swap: 1048568 268324 780244
It's running httpd/php5/mysql-4/postfix/amavisd-new/ejabberd/ntp/cupsd/apcupsd (slave)
Craig