RAM use continually increases


#1

I am currently developing a ruby on rails application and I am using c9 as my development environment. After a day of programming I notice the RAM use is abnormally high. I restarted c9 and the RAM dropped to almost nothing. After I restart my rails server the RAM usage goes up to a reasonable 190mb. Then by hand I stress test the system. In a few browser windows I open the site refresh a few times, log in, make a post or two. Rapidly ram use increases to around 320mb but, what I find more concerning is that then it goes (seemingly) flat. Even lacking any activity at all the ram usage stays the same. I closed all browser instances of the website and now, some time later I check again and the RAM use has actually increased! Now it is at 371mb of RAM (370 when I first began writing this). Surely RAM use should decrease after periods of activity. What is causing this?


#2

you can see what process use RAM and how much using ps command.

use
ps -eo user,pid,ppid,rss,size,vsize,pmem,pcpu,time,cmd --sort -rss | head -n 10
to verify if ruby cause this or other process cause.


#3

The output I receive from that is:

USER PID PPID RSS SIZE VSZ %MEM %CPU TIME CMD
ubuntu 2036 2029 177196 213216 943212 0.3 0.0 00:00:25 puma: cluster worker 1: 2029 [workspace]
ubuntu 2032 2029 173348 211528 943688 0.3 0.0 00:00:26 puma: cluster worker 0: 2029 [workspace]
ubuntu 2029 389 59876 76540 188392 0.1 0.0 00:00:21 puma 3.9.1 (tcp://0.0.0.0:8080) [workspace]
ubuntu 9723 9722 55220 133208 1259280 0.1 0.1 00:00:10 vfs-worker {“pingInterval”:5000,“nodePath”:"/mnt/shared/lib/node_modules",“tmuxBin”:"/mnt/shared/sbin/tmux",“root”:"/",“debug”:true,“connectionTimeout”:60000,“sshConnectTimeout”:30000,“metapath”:"/.c9/metadata",“wsmetapath”:"/.c9/metadata/workspace",“projectDir”:"/home/ubuntu/workspace",“extendApi”:{“collab”:{“file”:“c9.ide.collab/server/collab-server.js”,“user”:{“uid”:“1718355”,“email”:“btlynch@bsu.edu”,“name”:“trumpet”,“fullname”:“Brian Lynch”},“project”:{“pid”:5803477,“name”:“mtb”},“readonly”:false,“nodePath”:"/mnt/shared/lib/node_modules"},“pubsub”:{“file”:“c9.ide.pubsub/pubsub-service.js”},“ping”:{“file”:“c9.vfs.client/ping-service.js”}},“defaultEnv”:{}}
ubuntu 388 383 3236 9792 29124 0.0 0.0 00:00:00 bash -l
ubuntu 377 1 3168 1436 133148 0.0 0.0 00:00:00 /mnt/shared/sbin/tmux -u2 -L cloud92.2 new -s trumpet@mtb_361 export ISOUTPUTPANE=0;bash -l ; set -q -g status off ; set -q destroy-unattached off ; set -q mouse-select-pane on ; set -q set-titles on ; set -q quiet on ; set -q -g prefix C-b ; set -q -g default-terminal xterm-256color ; setw -q -g xterm-keys on
ubuntu 11149 388 2528 952 17264 0.0 0.0 00:00:00 ps -eo user,pid,ppid,rss,size,vsize,pmem,pcpu,time,cmd --sort -rss
ubuntu 10164 9723 2520 416 123736 0.0 0.0 00:00:00 /mnt/shared/sbin/tmux -u2 -L cloud92.2 attach -t trumpet@mtb_287
ubuntu 10162 9723 2432 416 123736 0.0 0.0 00:00:00 /mnt/shared/sbin/tmux -u2 -L cloud92.2 attach -t trumpet@mtb_361

I’m not very sure how to interpret that. I’m correct to believe that a web pages RAM should decrease after periods of inactivity correct?