4 ms·
Not 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 pr
by mperham 10y ago
Not 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.