in reply to MySQL multiprocessing

It doesn't make any sense that your forking approach was slow. Do you know what the slow part was? MySQL is very fast at creating new connections, and you can even pre-fork your connections so they are ready to roll when a query comes in.

If I were doing this and the obvious forking approach was too slow, I would make a mod_perl server that waits for queries and returns the results. You could just send the queries to it over HTTP from your script that reads the queue. This is all basically done for you in the GoferTransport-HTTP module.

Replies are listed 'Best First'.
Re^2: MySQL multiprocessing
by dr_k (Novice) on Dec 11, 2007 at 17:55 UTC

    You are right, the real slowdown is the xml rpc client I use (Frontier::Client)... time to try another one I suppose ;) and you are right again that even without it is forking way too faster than threads. so my next step will be fork() and different xml rpc client. thanks ;]