Answer the question
In order to leave comments, you need to log in
How to drill down on Unicorn's memory usage?
Ruby 2.1.3 and Unicorn 4.8.3 are installed on two different machines running Ubuntu Server 14.04 x32
Inside this environment is the same Rails 4.2 application. But on one machine, Unicorn eats up twice as much memory.
Here are excerpts from the output of the cat /proc/PID/smaps
First Car command
00bea000-01615000 rw-p 00000000 00:00 0 [heap]
Size: 10412 kB
Rss: 10376 kB
Pss: 10012 kB
Shared_Clean: 0 kB
Shared_Dirty: 728 kB
Private_Clean: 0 kB
Private_Dirty: 9648 kB
Referenced: 10076 kB
Anonymous: 10376 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
VmFlags: rd wr mr mw me ac sd
01615000-08823000 rw-p 00000000 00:00 0 [heap]
Size: 116792 kB
Rss: 111540 kB
Pss: 111540 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 111540 kB
Referenced: 111540 kB
Anonymous: 111540 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
VmFlags: rd wr mr mw me ac sd
09f35000-0a50d000 rw-p 00000000 00:00 0 [heap]
Size: 5984 kB
Rss: 5968 kB
Pss: 5878 kB
Shared_Clean: 0 kB
Shared_Dirty: 180 kB
Private_Clean: 0 kB
Private_Dirty: 5788 kB
Referenced: 5880 kB
Anonymous: 5968 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
VmFlags: rd wr mr mw me ac sd
0a50d000-0d8f7000 rw-p 00000000 00:00 0 [heap]
Size: 53160 kB
Rss: 53048 kB
Pss: 53048 kB
Shared_Clean: 0 kB
Shared_Dirty: 0 kB
Private_Clean: 0 kB
Private_Dirty: 53048 kB
Referenced: 53048 kB
Anonymous: 53048 kB
AnonHugePages: 0 kB
Swap: 0 kB
KernelPageSize: 4 kB
MMUPageSize: 4 kB
Locked: 0 kB
VmFlags: rd wr mr mw me ac sd
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question