[[PageOutline(2-5, Table of Contents, floated)]] = 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: [[Image(puffin-memory-month-2013-06-24.png)]] 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 [https://penguin.transitionnetwork.org/munin/transitionnetwork.org/puffin.transitionnetwork.org/http_loadtime.html 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: [[Image(puffin-multips_memory-month-2013-06-24.png)]] 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: [[Image(puffin-swap-month-2013-06-24.png)]] 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: [[Image(penguin-memory-month-2013-06-25.png)]] [[Image(penguin-swap-day-2013-06-25.png)]]