How to understand output from top, free, etc.?

top - 02:53:17 up 41 days,  5:54,  0 users,  load average: 21.35, 15.89, 9.11
Tasks:   6 total,   1 running,   5 sleeping,   0 stopped,   0 zombie
%Cpu(s): 65.7 us, 25.4 sy,  0.0 ni,  4.3 id,  2.2 wa,  0.0 hi,  2.3 si,  0.0 st
MiB Mem :  31476.3 total,   1022.7 free,  25023.5 used,   5430.0 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used.   5562.8 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                         
     68 render    20   0  384312 187700   5236 S  10.6   0.6  76:35.54 ruby                                            
      1 render    20   0    5492    728    456 S   0.0   0.0   0:00.07 bash                                            

This is what top shows for my Rails app running in a Starter instance. It’s described on Change Plan as RAM 512MB, CPU 0.5. So obviously here, there’s a lot more RAM shown. There’s also a very high uptime. ?

Hi Robb,

Services on Render run inside Docker containers running on Kubernetes, Linux tools like top and free etc aren’t aware of this so report the system resources as opposed to what is available to them in their container space.

cgroups are what are used to limit resources so you have to look at them to determine what resources are available - some reading material, https://fabiokung.com/2014/03/13/memory-inside-linux-containers/

Regards

John B

1 Like