Specs and cucumber : 32 or 64bit?
I was noticing that our tests were consuming more and more memory when a dear co worker advised me to change the jvm from 64bits to 32bits. After reading his source, I gave it a try, and actually noticed an improvement in the jvm memory footprint of 42%. So I did it on the full stack VM gentoo (1 core & 2Gb) + mysqld + ruby + jvm. I built one 32bit stack and one 64bit and here are the results:
In terms of memory, going from 64bits to 32bits represents a gain of 38% and in terms of processor, a gain of 12%. The tests are a little bit quicker, but the main concern was the memory footprint. So my co worker was right, even for ruby, if your application is less than 2Gb, go for 32bits architecture.
(I used a bash script to gather data as csv with ps - C “process_name”
and a ruby script to draw the graph with google api, if you are interested, here is the gist!)
Written by Pierre Ozoux
Related protips
2 Responses
Interesting! Are you using jRuby?
Nope, just with ruby :)