Also as you said issue might be with cruby due to global interpreter lock, but since we explicitly measured timings on acquire method on thread pool via rbtrace, looks like the thread is scheduled and then waits on some lock within the threadpool
On Mon, Dec 25, 2017 at 11:50 AM, shashank Jain <[email protected]> wrote: > Yes also a lockless implementation would help. We will see if we can > contribute to some improvement on the pool implementation. > Thanks > Shashank > > On Mon, Dec 25, 2017 at 11:39 AM, Jeremy Evans <[email protected]> > wrote: > >> On Sunday, December 24, 2017 at 9:13:21 PM UTC-8, shashank Jain wrote: >>> >>> Also one more observation was that if we run multiple iterations of the >>> test, the pool should have been warmed up, but still acquire connection >>> takes a lot of time. >>> May be also some internal issue with the pool implementation >>> >> >> Could be, but could also be a general issue with CRuby when used with >> hundreds of simultaneous threads. I'm certainly open to patches that >> improve performance without changing behavior, as long as complexity >> doesn't increase too much. >> >> For a huge number of threads, it's likely a Queue-based connection pool >> implementation would be a better than the Array+Mutex+ConditionVariable >> approach currently used. Note that you can use the Database :pool_class >> option to provide a custom connection pool class tuned to your specific >> needs, if the default connection pool does not operate optimally in your >> environment. >> >> Thanks, >> Jeremy >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "sequel-talk" group. >> To unsubscribe from this topic, visit https://groups.google.com/d/to >> pic/sequel-talk/5NNUNaHqIMY/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> To post to this group, send email to [email protected]. >> Visit this group at https://groups.google.com/group/sequel-talk. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "sequel-talk" 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 https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
