
03-18-2012, 12:08 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Jun 2011
Posts: 56
|
|
How Can There Be Such Tremendous Differences in Memory Usage?
I switched from one provider to another one, and here are the differences in specs on the particular machines:
Old provider: Centos 5.8 64Bit, SMP Linux, Xen Virtualization using OnApp, 2GB memory, swap file
New Provider: Centos 5.7, i686, Virtuozzo, 3 GB, no swap
I basically cloned the server 1:1 to new server, compiled the kernel and everything having the exact same options and features, at the server level and with cpanel. Apache options, PHP, Xcache, MySQL setting etc. is all the same.
On the "old" machine with 2GB of memory i had 270ish tasks running with a real memory usage (free -m) of 1.6GB - 1.7GB leaving me barely 350MB of true "free" memory.
On the new machine now with 3GB, my memory usage is SIGNIFICANTLY less, down to barely 600MB with a whopping 2.47 GB free. I see about 60 tasks running right now.
I am puzzled since in the past memory usage was my main concern and now i have 2.47GB free.
What is the main difference which used up so much memory with the old machine?
|

03-18-2012, 12:13 AM
|
|
MACBOOKS EVERYWHEREEEEEEEEEEEE
|
|
Join Date: Mar 2009
Posts: 3,804
|
|
virtuozzo isn't real virtualisation.
glorified chroot.
__________________
mirACL: firewalls in software.
|

03-18-2012, 12:16 AM
|
|
Aspiring Evangelist
|
|
Join Date: Apr 2010
Location: North Carolina
Posts: 429
|
|
Are you sure you were checking your memory usage right?
http://www.linuxatemyram.com/
|

03-18-2012, 12:28 AM
|
|
Web Hosting Master
|
|
Join Date: Jul 2010
Posts: 704
|
|
In addition, you've also switched from a 64-bit to a 32-bit OS, no?
64-bit operating systems use more memory, though not 2GB worth in this case 
|

03-18-2012, 12:38 AM
|
|
Web Hosting Master
|
|
Join Date: Mar 2010
Posts: 3,903
|
|
Quote:
Originally Posted by dmmcintyre3
|
This is most likely the case..... I believe openvz(virtuozzo) displays memory differently than xen does.
Even with different virtualization platforms, the memory usage shouldn't be that different. And the only major differences would most likely be from those running Java programs or the fact that The XEN install is running it's own OS VS pretty much a chroot off of the host.
|

03-18-2012, 12:43 AM
|
|
iNET Interactive
|
|
Join Date: May 2006
Location: San Francisco
Posts: 7,154
|
|
If that specific Virtuozzo setup isn't using SLM, that'll explain the large memory discrepancy versus Xen.
|

03-18-2012, 12:55 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Jun 2011
Posts: 56
|
|
I think it DOES use SLM, but i found something:
[root@server etc]# free -m
total used free shared buffers cached
Mem: 3072 650 2421 0 0 0
-/+ buffers/cache: 650 2421
Swap: 0 0 0
Why is shared/buffers/cached all at ZERO?
|

03-18-2012, 12:57 AM
|
|
Aspiring Evangelist
|
|
Join Date: Apr 2010
Location: North Carolina
Posts: 429
|
|
Quote:
Originally Posted by GeorgRauh
Why is shared/buffers/cached all at ZERO?
|
because it doesn't use SLM
|

03-18-2012, 01:10 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Jun 2011
Posts: 56
|
|
Excuse my ignorance, so does this mean it's the real memory usage? Trying to understand this...
|

03-18-2012, 01:11 AM
|
|
Aspiring Evangelist
|
|
Join Date: Apr 2010
Location: North Carolina
Posts: 429
|
|
Do you still have the old VPS? If so, post the output from free -m
|

03-18-2012, 01:30 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Jun 2011
Posts: 56
|
|
No, but of course in all my former VPS buffers/cache etc. were always used, but real memory usage (according to cpanel or free -m, ie. minus buffer and minux cache) was still significantly higher, only about 350MB left.
|

03-18-2012, 01:36 AM
|
|
Aspiring Evangelist
|
|
Join Date: Apr 2010
Location: North Carolina
Posts: 429
|
|
Did the old VPS ever use more than 50mb swap? It's kinda rare for a 2gb VPS to come down to 350mb free excluding buffers/caches with low to no swap usage. It's also impossible for a OpenVZ/Virtuozzo VPS with allocation based memory limits to use less RAM than a Xen VPS with the same config and same stuff running.
As a quick test to make sure you are reading free -m right, how much RAM is this server using?
Code:
free -m
total used free shared buffers cached
Mem: 3928 1179 2749 0 80 362
-/+ buffers/cache: 736 3191
Swap: 4095 3 4095
|

03-18-2012, 01:48 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Jun 2011
Posts: 56
|
|
total used free shared buffers cached
Mem: 3072 667 2404 0 0 0
-/+ buffers/cache: 667 2404
The *old* server only used swap (350+/- MB) if it was up for some time, so yes it did use over 50MB swap
|

03-18-2012, 01:50 AM
|
|
Junior Guru Wannabe
|
|
Join Date: Jun 2011
Posts: 56
|
|
Quote:
Originally Posted by dmmcintyre3
Did the old VPS ever use more than 50mb swap? It's kinda rare for a 2gb VPS to come down to 350mb free excluding buffers/caches with low to no swap usage. It's also impossible for a OpenVZ/Virtuozzo VPS with allocation based memory limits to use less RAM than a Xen VPS with the same config and same stuff running.
As a quick test to make sure you are reading free -m right, how much RAM is this server using?
Code:
free -m
total used free shared buffers cached
Mem: 3928 1179 2749 0 80 362
-/+ buffers/cache: 736 3191
Swap: 4095 3 4095
|
Oh sorry, 736MB? (1179 with the caches)
|

03-18-2012, 05:49 PM
|
|
Web Hosting Master
|
|
Join Date: Jan 2003
Location: SLC
Posts: 727
|
|
Virtuozzo Technology
shares the RAM among similar applications running in different Containers
that's where your ram saving comes from
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
| Postbit Selector |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|
|
| Login: |
|
|
| Advertisement: |
|
|
| Web Hosting News: |
|
|
|