Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Same processes but different RAM usage on OpenVZ??
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Same processes but different RAM usage on OpenVZ??

sandrosandro Member
edited December 2012 in General

Hello,
I have two VPSes one 256/384MB burst ubuntu 12.04 32bit, one 256MB no swap/burst ubuntu 12.04 32bit running the same processes.
When I type free -m (on +/- buffer cache) on the first one I get 77MB used but on the second one I get 14MB used.

Why is that?

Comments

  • Are they doing the exactly the same task?

    What kernels are they running? (output of uname -a)

  • Yes it's just nginx mysql and php-fpm with the same settings.

    77MB one is

    Linux server1 2.6.18-194.26.1.el5.028stab079.2 #1 SMP Fri Dec 17 19:25:15 MSK 2010 i686 GNU/Linux

    14MB one is

    Linux server1 2.6.32-042stab065.3 #1 SMP Mon Nov 12 21:59:14 MSK 2012 i686 i686 i386 GNU/Linux

  • There's the difference. Kernel 2.6.18 has much different memory allocation than 2.6.32.

    I wouldn't worry about it unless processes start getting killed due to being out of memory.

  • OK...but what exactly is the real RAM usage I should consider? :P For example if I had only the first VPS I would think that 64MB wouldn't be enough to run those things but with the second one it seems I can run even on <32MB...I'm confused :D

  • The vswap one will report lower, thats normal.

  • @jcaleb read again the one without burst/swap is at 14mb where the other one that is using 77mb has burst.

  • @24khost said: @jcaleb read again the one without burst/swap is at 14mb where the other one that is using 77mb has burst.

    I think that's what jcaleb said.

  • @Corey Nope, he said the vswap one will report lower. That is wrong as there is no vswap one.

  • i assume the second one is .32

  • @24khost said: @Corey Nope, he said the vswap one will report lower. That is wrong as there is no vswap one.

    Oh, I thought 2.6.32 was a vswap kernel.

  • I see what your saying now. Yes I think that is the vswap kernal but no vswap enabled.

  • sandrosandro Member
    edited December 2012

    where is the kernel vswap saved?

    Plus is there a way to predict how the vsawp will behave? I mean if the system caches the RAM it implies (to me) that I could run more processes on the same amount of RAM compared to a .18 kernel. Is that true?

  • That kernal supports vswap. But is not enabled on your container.

  • @24khost said: That kernal supports vswap. But is not enabled on your container.

    hum I'm confused so what is that caching?

  • @sandro said: hum I'm confused

    http://www.linuxatemyram.com/ is a good site that may or may not help

  • @Damian said: http://www.linuxatemyram.com/ is a good site that may or may not help

    Linux loves ram.

  • @Damian said: http://www.linuxatemyram.com/ is a good site that may or may not help

    This might also help:
    http://www.downloadmoreram.com/download/

  • @mnpeep said: This might also help:

    http://www.downloadmoreram.com/download/

    I don't understand this one.

  • guys...none of these funny posts are not actually helping.
    What I'm asking is: let's pretend I have two 32MB VPSes one with .18 and one with .32.
    They both run nginx only. One will show me 0MB free and the other one will show me 20MB free because 12MB of the RAM is cached. Does it mean that on VPS .18 will not be able to run any other process and instead the VPS .32 will? Or it will eventually crash cause the vswap will not be able to keep up with high I/O (since is stored on the disk) with high traffic?

    Why .18 doesn't have this feature?

    Last question...when providers offer swap on your container will it be stored in the same HDD as the VPS like kernel vswap or another one?

  • CoreyCorey Member
    edited December 2012

    @sandro said: guys...none of these funny posts are not actually helping.

    What I'm asking is: let's pretend I have two 32MB VPSes one with .18 and one with .32.
    They both run nginx only. One will show me 0MB free and the other one will show me 20MB free because 12MB of the RAM is cached. Does it mean that on VPS .18 will not be able to run any other process and instead the VPS .32 will? Or it will eventually crash cause the vswap will not be able to keep up with high I/O (since is stored on the disk) with high traffic?

    Why .18 doesn't have this feature?

    Last question...when providers offer swap on your container will it be stored in the same HDD as the VPS like kernel vswap or another one?

    On openvz swap is actually stored in the hardware nodes ram. It artificially slows the access to the ram to make it seem like real swap.

  • @Corey said: On openvz swap is actually stored in the hardware nodes ram. It artificially slows the access to the ram to make it seem like real swap.

    I see...now things are much more clear even though I don't get what you mean by "openvz swap"? Some said I have vswap kernel but not a "real" vswap according to my plan. Are they both stored in the node RAM?

    How does it simulate slowdowns?

  • You have a plan with no burst/swap, so even though your on a node that has the vswap kernle you don't have vswap. .32 just handles memory differently. .18 caches memory so it just holds on to it until it needs it for something else. They both do the same job just a little differently.

  • Ok but .32 caches it somewhere...where?

  • @sandro said: Ok but .32 caches it somewhere...where?

    My prior post about http://www.linuxatemyram.com/ wasn't "a funny post"; it's a basic primer on Linux ram utilization in simple terms.

    It's cached in your ram, but doesn't count towards your utilized ram, since applications can allocate ram against it.

  • CoreyCorey Member
    edited December 2012

    @sandro said: Ok but .32 caches it somewhere...where?

    If you have no buffers/cache in your .32 then you probably haven't had to access anything on the disk so linux isn't eating your ram yet.

  • So we can assume that .18 will have bigger ram usage over .32?
    No matter whether it has vSwap or not.

  • @sandro said: Ok but .32 caches it somewhere...where?

    Basically what everyone here is telling you is Don't worry about it. Its how they manage the memory.

    Seriously though, like what @Damian said, http://www.linuxatemyram.com is a great resource for this.

Sign In or Register to comment.