c10k paradigm

Eric Wong normalperson at yhbt.net
Mon Apr 15 18:30:11 UTC 2013


Alexandre Riveira <alexandre at objectdata.com.br> wrote:
> What is A better paradigm for C10K paradigm
> 
> 
> From what I'm seeing are the best:
> 
> EventMachine (less memory and cpu usage)

Not all DB adapters are fully non-blocking.  If you want to do uncached
filesystem I/O, you'll either have to use threads or block, too.

> XEpollThreadPool (more memory and cpu usage but there are problems
> when blocking io, for example database

Maybe not CPU usage, but probably more memory.  But this is probably the
most compatible with existing apps/gems and Ruby stdlib (assuming you
use Linux).

Fwiw, I usually go with this one (or something close[1]) when uncached
disk I/O is a requirement.

If you're not on Linux, (nginx + (portable)ThreadPool) should get you
close to XEpollThreadPool.

Likewise for (nginx + (portable)ThreadSpawn) and XEpollThreadSpawn


[1] http://bogomips.org/cmogstored/queues.txt


More information about the rainbows-talk mailing list