wiki:RamUsage

Version 14 (modified by chris, 3 years ago) (diff)

--

Table of Contents

  1. puffin
  2. penguin

RAM Usage

Some notes on the RAM allocated and used by the virtual servers as of June 2013, see ticket:555#comment:61 for the reason for the creation of this page and the time spend on it.

puffin

wiki:PuffinServer is the server running https://www.transitionnetwork.org/ and it was originally created with 4GB of RAM. On 20th June, following problems related to how it was coping with the load it was under, this was doubled to 8GB of RAM.

Following is a memory usage graph from the Munin stats for the server which illustrate the increase:

Puffin Monthly RAM Usage 24th June 2013

Key figures to consider in the above graph is the value for the amount of current committed and active RAM, in this case 8.82GB and 4.63GB and also the amount of maximum committed and active RAM, in this case 4.30GB and 5.12GB.

The RAM increase has made a significant amount of RAM available for caching and buffers and this has the knock on effect of speeding up the time to serve frequently accessed files to clients as they are held in RAM rather than being read from disk -- the average loadtime for pages is now less than half it was before the additional RAM was added (12.15 milliseconds compared to 31.59 milliseconds).

The sawtooth pattern is caused by MySQL slowly increasing it's memory usage as more things are cached, the dramatic dips are caused when MySQL is restarted, this is made clear in the graph below which tracks the memory used by some of the key processes on the server:

Puffin Multi-PS Memory Usage 24th June 2013

The increase in php-fpm memory usage above, which coincides with the increase in the RAM allocated to the server, is due to an increase in the minimum number of php-fpm processes which are kept available to server client requests.

The max memory usages for the key processes in the graph above, nginx 0.6GB, php-fpm 4GB, mysql 2.3GB, redis 0.2GB come to a total of 7GB.

In the first graph above one key thing to note is the amount the server is swapping -- this is is in red and it's also illustrated on the following graph of swap space used:

Puffin Swap 24th June 2013

Since the RAM was increased from 4GB to 8GB the server hasn't use any swap space.

penguin

Penguin is using a significant amount of swap and would benefit from an additional 1GB of RAM based on these graphs:

Attachments