VPS disk cache

vps

#1

I contracted a VPS with 1000Mb and watch the memory consumption graph I can see that my server uses about 100MB of RAM (red line) but I see that the cache (yellow line) occupies the entire physical memory that I have contracted.? is this normal?

In my server I have a PHP application developed by our company with a shared MySQL.


#2

Yes and No. It isn’t “normal”, but it appears to happen a bit on DH VPS.

Did you upgrade to VPS from a Shared server?


#3

Yes, I upgrade from a shared server. All run OK but I can see than all memory of the server (800Mb or more) is used by cached memory. Why?


#4

That question has not been answered at an official level.

Are you receiving memory warning emails, or is your server being forcefully rebooted?


#5

No warnings emails. I rebooted my server manually but memory return to same values: 100 MB more or less of memory RAM (red line) and 900MB of “cached memory” (yellow line). And Load averga is under 0.50%. Any idea?


#6

Same thing keeps happening to me. Red line is usually under 100mb but the cache keeps increasing until it reaches the limit and server reboots (pretty much every single day now). My site does have decent traffic, but it’s mostly static html with one wordpress installation (which only uses 20mb). I’m not sure if I should just give up on the VPS and go back to shared. The main reason I switched was because of “heavy usage” which lead to my traffic being throttled and me making a LOT less money on adsense. I really don’t think I actually need a VPS but I’m terrified of more throttling on shared hosting since I need adsense to pay my bills.


#7

The reason for there being no answer yet “at an official level” is because it’s specific to each situation and what’s running on your VPS.

Cached memory can be high for many reasons: sometimes Apache needs it, sometimes it’s being used for mod_pagespeed processes, sometimes it’s used for actual buffers on your sites – but unfortunately there isn’t an easy way to figure out what’s using it at a given time.

You guys can try lowering the limit to what it appears to be using consistently in total memory and see how it adjusts and utilizes the resources at that rate. It may also be beneficial to “reset” the limits now and again if in doubt, by lowering/raising back up the limit with some time inbetween for it to take effect. If it appears to be a necessary thing to have to reset it to keep the cached memory line down, you both are always welcome to write to us with any details you can provide on what you have running. In general, though, some site/hosting setups just require more cached memory than others and it’s generally a good thing when it’s being used.

I hope that helps! Like I said, just contact our support team if you guys have any questions/concerns (as you’ve done in the past); We’re always happy to help :slight_smile:


#8

In theory disk caching should consume all available memory, as this way none of your RAM is going unused, but it should likewise give up that RAM as soon as something else needs to use it. I believe it’s only something to worry about if it’s causing your total memory to exceed your allowance long enough that your server ends up being restarted.


#9

I’m seeing the same thing – actual memory 100mb or less, constant over the 3 months I’ve had the VPS. The cache rises and falls somewhat, but trends upward and eventually hit my memory limit and I got the nasty email and was rebooted.

I was going to as a question here (in the forums) to see if somebody can explain it to me, but it looks like you all are as mystified as I am. I guess I am just going to have to plan on doing periodic manual reboots (so I can do them in quieter times). I am not using WordPress – it’s custom PHP code and I don’t think I have any memory leaks.