Seeing some strange behavior in profiling #2207
Replies: 1 comment 8 replies
-
This is a If this is causing an actual issue, I'm OK with making the Also, you may want to try using the timed_queue connection pool ( |
Beta Was this translation helpful? Give feedback.
-
Hey all,
I'm seeing some strange behavior in some of our threads with them spending a lot of time this sleep call: https://github.com/jeremyevans/sequel/blob/master/lib/sequel/connection_pool/threaded.rb#L297
This is a job within sidekiq.
My first though is that we have a cpu issue. But in the profiling at least it doesn't seem to be indicate that sleep is using the most across all threads in various jobs. We do have some high CPU usage in some workers but not all of them.
Wouldn't high CPU usage make threads want to swap faster therefor spend less time sleeping?Actually maybe that makes sense. It's sleeping longer because another thread grabbed context causing this one to stay sleeping. Does that sound right? It still doesn't explain to me though why most of the profiling time is sleeping.
Any idea what could cause our threads to spend a lot of time in the sleep method?
Beta Was this translation helpful? Give feedback.
All reactions