On Mon, Apr 1, 2013 at 6:09 PM, Sebastian Riedel <[email protected]>wrote:
> To scale with blocking backend APIs you have to increase the number of > worker processes and reduce the number of concurrent connections each > worker is allowed to handle. Mojo::Server::Prefork::workers() states "Number of worker processes, defaults to 4. *A good rule of thumb is two worker processes per CPU core.*" Why is the good rule of thumb linked to the number of CPU cores? If your app blocks but you expect or wish to be able to handle a few dozen concurrent connections, wouldn't you need a few dozen workers? On my machine with 4 core, -w 8 -c 1 is insufficient to handle 30 concurrent connections but -w 30 -c 1 handles it well. Is sri's advice documented anywhere in the Mojo docs? Would it be prudent to do so -- to indicate better tuning advice for use with blocking backend APIs? -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/groups/opt_out.
