We are developing a back end application which is supposed to handle a large number of RPC calls, each of them issueing a transaction to MySQL Cluster through the ClusterJ API. We would like to be able to handle around 2000 RCP calls per server in parallel and want to run a few of these servers. We are running one thread per RCP call and do currently creation one session for each of these calls. After handling the RPC calls, the session is closed and thrown away.
The issue we are facing is that session creation becomes really slow with such a large amount of threads. Using 100 threads, session creation takes only a few milliseconds, but using 1000 threads session creation takes 500 milliseconds or longer what is much too slow for our purpose.
The question now is if we missunderstood the use of session or whether we can increase throughput somehow else. Is our assumption correct that we should use one session per thread and close it after the transaction was executed or should we reuse them?
Our assumption so far was that we need to close sessions after each RPC as the internal data structures do not seem to be cleared otherwise.
We tried to incease the clusterj connection pool size but haven't seen a hughe efect so far.
Thank you very much in advance for your advice.
The issue we are facing is that session creation becomes really slow with such a large amount of threads. Using 100 threads, session creation takes only a few milliseconds, but using 1000 threads session creation takes 500 milliseconds or longer what is much too slow for our purpose.
The question now is if we missunderstood the use of session or whether we can increase throughput somehow else. Is our assumption correct that we should use one session per thread and close it after the transaction was executed or should we reuse them?
Our assumption so far was that we need to close sessions after each RPC as the internal data structures do not seem to be cleared otherwise.
We tried to incease the clusterj connection pool size but haven't seen a hughe efect so far.
Thank you very much in advance for your advice.