Howdy, Stranger!

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


In this Discussion

rtorrent on openvz, constant swapping?
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.

rtorrent on openvz, constant swapping?

awvnxawvnx Member
edited June 2016 in General

I have an OpenVZ VPS with 1 GB RAM and 1 GB swap.
I'm running rtorrent uploading at 8 MB/s.
In .rtorrent.rc I've set max_memory_usage = 300 MB

I've noticed that the process only uses about 50 MB of RAM (RES column in top), with around 200 MB of swap used. Fine, nothing wrong with swapping out unused pages, but then I noticed from running dstat that there's constantly 1.5 MB/s read and write from the swap.

So there's around 40 MB of RAM used, and 950MB of cache, yet it still wants to put active pages into the swap file? Why is this happening? At least this is an SSD server so speed doesn't seem to be impacted, but constant 1.5 MB/s paging means writing 50 TB to the swap file every year for no reason. Considering the specified TBW limit for enterprise drives might be around 500 TB, this is kind of killing the SSD.

I can't control swappiness since it's openVZ. I've tried running rtorrent with nocache so that it doesn't use up cache... but that doesn't seem to do anything. Maybe I should just disable swap entirely? I plan on running some java servers in this VPS too and swap would be useful for them though...

Comments

  • FalzoFalzo Member

    beside your detailed problem: openvz doesn't really do swapping to a disc space. vswap is some kind of virtual swap memory model which is indeed allocated in real memory itself but with very limited access speeds.

    I'd suggest to just do the opposite and raise that max_memory_usage setting, which may give rtorrent room to breathe at all and do less swapping as a result.
    why restrict it much if you have 1 GB?

    300MB are probably an overall max, so the 40 MB you are seeing is the part which is really needed and maybe 260 MB are reserved and blocked for other things - therefore the constant swapping. I'd set it to 900 MB and see what happens...

    after all you can't change swappiness but check on the number. normally OVZ systems I came across have this set to 60 - if you see another value ask your provider about.

    Thanked by 1TheOnlyDK
Sign In or Register to comment.