2 ms·
Ok, thanks for your answers, that sounds reasonable. So if I have a multi-core machine with 8 cores I can utilize all of them if I have 8 CPU intensive jobs (co
by protomikron 10y ago
Ok, thanks for your answers, that sounds reasonable. So if I have a multi-core machine with 8 cores I can utilize all of them if I have 8 CPU intensive jobs (considering they fit into memory)?
- mperham 10y agoNot with MRI. The standard Ruby interpreter, like Python, uses a global lock to prevent threads from executing in parallel. You'd need to spin up 8 Sidekiq processes by hand or use the multi-process feature to automate that manual process. That said, your scenario is unusual. Most server-side jobs have plenty of I/O (think DB queries, memcached/redis calls, file I/O, etc), which allow the threads to context-switch; lots of I/O concurrency means lots of jobs get done quickly, even with one core.