CPU [ 0.0%] Tasks: 15, 2 thr; 1 running
Mem [|||| 14/256MB] Load average: 0.00 0.00 0.00
Swp [| 1/256MB] Uptime: 15 days, 06:02:31
Above is the memory usage on my server (Ramnode, 256MB RAM with 256MB Swap) when there's no Ghost instance. On my VPS I am running 4 Ghost instances.
So when I ran a Ghost instance here with the command node index.js
, it spawns 5 workers.
PID USER PRI NI VIRT RES SHR S CPU% MEM% TIME+ Command
10380 user 20 0 975M 80328 7712 S 0.0 30.6 0:00.00 node index.js
10381 user 20 0 975M 80328 7712 S 0.0 30.6 0:00.00 node index.js
10382 user 20 0 975M 80328 7712 S 0.0 30.6 0:00.00 node index.js
10383 user 20 0 975M 80328 7712 S 0.0 30.6 0:00.00 node index.js
10384 user 20 0 975M 80328 7712 S 0.0 30.6 0:00.00 node index.js
5 workers are actually quite a lot. And 30% is also a lot.
And now, the htop
reading
CPU[ 0.0%] Tasks: 18, 7 thr; 1 running
Mem[||||||||||||||||||| 82/256MB] Load average: 0.00 0.00 0.00
Swp[|| 8/256MB] Uptime: 15 days, 06:22:29
How to reduce the memory usage? If I can adjust the number of workers, which file should I edit? If we have Ghost dev team here, do you have any plan on this issue?