kzk/unicorn-worker-killer

Question about memory_limit_max

Closed this issue · 2 comments

Hello, how does this...

use Unicorn::WorkerKiller::Oom, (192*(1024**2)), (256*(1024**2))

compare to this...

Unicorn::WorkerKiller::Oom(memory_limit_min=(10243), memory_limit_max=(2*(10243)))

I'm looking for advice about what I should set the min and max to for a 2X dyno (1024MB) on Heroku, and it's not clear to me what unit 10243 is in or why it is multiplied by 192 or 256 or why it is squared with **2.

Thank you!

The min and max memory values appear to be expressed in bytes so 1024**2 just means 1 megabyte (1024 x 1024).

192*(1024**2) == 192MB and 256*(1024**2) == 256MB.

I'm not sure about where 10243 comes from as that equates to ~10KB and seems ludicrously low for a Unicorn worker. The actual defaults in the source are 1-2GB.

Thank you very much.