4 ms·
GC Disabled, Memory required to process 10,000 jobs reduced from 1257 MB to 151 MB . So it may mean (unless there's a general overhead) that, 15KB of memory is
by diminish 11y ago
GC Disabled, Memory required to process 10,000 jobs reduced from 1257 MB to 151 MB . So it may mean (unless there's a general overhead) that, 15KB of memory is used vs. 125.7KB previously. assuming the job still itself leaks the same memory it means sidekiq itself was leaking 125.7KB per job previously, am I right?
- schneems 11y agoLeaking is the wrong word. A leak implies that the memory was retained, RAM usage will go up forever and the process will eventually crash as a result. This is memory that sidekiq needs to do it's job, allocating strings, hashes, arrays etc. that will all be cleaned up eventually. Larger, more complex objects take up more memory. I.e. strings take up less memory than a hash. What he has done is eliminate the need to allocate so many large objects. This means less GC is needed, and overall performance is increased. See http://www.schneems.com/2015/05/11/how-ruby-uses-memory.html http://www.schneems.com/2015/05/11/how-ruby-uses-memory.html for more info.