Howdy, Stranger!

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


Why do some VPS cache ram and some don't?
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.

Why do some VPS cache ram and some don't?

Hello,

I've a few low end vps and I'm ask myself why some cache a bit of my ram and others don't. E.g. one VPS @DotVPS with 64MB ram caches some of the ram when I simply run apt-get update && apt-get upgrade. One of my other from httpzoom (96MB ram) doesn't do that. On linuxatemyram.com I read, that caching is normal and it provides a faster system. Why is that? Does the system cache some extra files in ram for a faster read and write speed? On Webhostingtalk I've read that the node server of OpenVZ caches and that's why I don't see any cached ram. But both server are virtualized with OpenVZ.

I hope you can give me some answers for my questions :)
P.S. both servers are running with debian 6.0.7 64 bit minimal.

Thank you in advance!

Comments

  • SpeedBusSpeedBus Member, Host Rep

    By chance does this have something to do with Swappiness ?

    ** Not a Advt **
    http://wiki.crowncloud.net/doku.php/how_do_i_configure_swappiness

    ^^ something of that sort ?

  • trexostrexos Member

    Mhm, I don't think so. I mean real ram caching, not vswap or something like that. I don't even have vswap. Please correct me when I'm wrong.

  • SpeedBusSpeedBus Member, Host Rep

    Just to try, what does,

    cat /proc/sys/vm/swappiness
    

    output ?

  • Post the uname -a output from both containers

    The one that doesn't show cached ram probably will have EL5 in the kernel version.

  • trexostrexos Member

    @SpeedBus said:
    Just to try, what does,

    > cat /proc/sys/vm/swappiness
    > 

    output ?

    60

    @dmmcintyre3 said:
    Post the uname -a output from both containers

    The one that doesn't show cached ram probably will have EL5 in the kernel version.

    Show cache: Linux s5 2.6.32-042stab076.8 #1 SMP Tue May 14 20:38:14 MSK 2013 x86_64 GNU/Linux

    Don't show cache: Linux s3 2.6.32-348.4.1.el5.028stab107.1 #1 SMP Wed Apr 17 19:37:50 MSD 2013 x86_64 GNU/Linux

    You're right. What does EL5 mean? :)

  • SpeedBusSpeedBus Member, Host Rep

    EL5 = CentOS 5.x iirc (ie, Red Hat Enterprise Linux 5)

  • OpenVZ on CentOS 5 doesn't show cached memory inside containers.

  • trexostrexos Member
    edited June 2013

    Okay thanks! So that means that only with Red Hat Enterprise Linux Kernel it is not possible to cache ram?

  • The extra memory is still used for cache, it's just not shown inside the container when the host node is running CentOS 5. CentOS 6 based host nodes will show cached memory inside the container.

  • trexostrexos Member

    Okay, so host node of the server with shown cached ram is running centos 6? And the other is running with the old CentOS 5 version?

    Does EL5 mean it's red hat enterprise linux 5 or it's possible that it's centos 5 because it's made of red hat enterprise linux?

  • Yes.

    EL5 could mean anything based on RHEL5 (including CentOS 5)

  • Good job of explaining this @dmmcintyre3 :)

  • MaouniqueMaounique Host Rep, Veteran

    The caching is done both on the node and in the container on rhel 6.
    The more free ram, the better the performance of the storage. Well, that is not scaling linearly, of course, the first GBs count a lot more than the last, however, in a nightmarish multithreading environment such as a large OVZ server, you can benefit from extra ram to a larger degree than in a regular server.

  • CloudxtnyHostCloudxtnyHost Member, Host Rep

    @trexos we have some Centos5 nodes, however our new nodes are now Centos6. If you want to be moved please submit a ticket and we will get that done for you!

  • trexostrexos Member

    @Jack said:
    I'm pretty sure I told you this in a ticket?

    RHEL5=Burst RAM

    RHEL6= vSwap

    Hello,
    Oh I didn't open a ticket for that?:o I think you take me for somebody else :p But what do you mean with RHEL 5 = Burst Ram and RHEL6 = vSwap. That in RHEL5 only Burst Ram is possible and in RHEL6 vSwap? I thought Burst Ram, is real Ram which you can get if the node has enough. And just for a short time.
    And vSwap is space on a HDD or SSD.

    @Maounique said:
    The caching is done both on the node and in the container on rhel 6.
    The more free ram, the better the performance of the storage.

    "The caching is done both on the node and in the container on rhel 6." Does this mean I get some extra cache Ram from the node which I can't see with free -m? But I thought the more cached rame, the better the performance of the storage. Because the VPS caches for a better performance of the storage?

    @httpzoom said:
    trexos we have some Centos5 nodes, however our new nodes are now Centos6. If you want to be moved please submit a ticket and we will get that done for you!

    Thanks, but I don't need a change. It's okay for me :)

  • MaouniqueMaounique Host Rep, Veteran

    @trexos said:
    Does this mean I get some extra cache Ram from the node which I can't see with free -m?

    yes and no. There should be some free ram for cache on the node (at a responsibly managed node) which will not show in your free -m command, but that is caching in general, not caching your particular I/O activities.
    The unikernel design on OVZ makes it difficult to differentiate, but, the more free ram there is, the better the machine responsiveness, both on node and on container.

    As I said, it does not scale linearly, i.e. if you have 1 GB free will not be 10 times better than having 100 MB, merely 2-3 times as a rough estimate, depending on your usage, however on the OVZ nodes this is somewhat different, OVZ is a strange beast where the same general rules do not apply exactly, it also keeps changing with each release...
    One thing is sure: more free ram, faster machine.

  • trexostrexos Member

    @Jack said:
    trexos sure you asked to advantages/difference from vSwap to Burst RAM didn't you? was that not you?

    Eh don't think so. I just opend a ticket about minimal images :)

    @Maounique said:
    One thing is sure: more free ram, faster machine.

    Ah okay thanks for your help :)

Sign In or Register to comment.