I monitored CPU utilization via htop, and I found Python process started using CPU constantly as the connection establised. It seems AsyncoreConnection is looping in a high frequency for events under the hoop. This caused a high load average on my server. As I don't see any documentation mention about this(sorry if I miss something), I'd like to ask is it a known issue when using asyncore for event loop?
Environment
ubuntu12.04, cassandra 1.2.6
Pull Requests
None
Activity
Show:
Greg Bestland May 13, 2016 at 4:19 PM
I'm not going to add a integration test around performance, as those tend to be extremely fragile. I was able to reproduce the issue prior to the change, after the change it looks to be much improved. I don't see any regressions related to this change I'm moving it to done.
Adam Holmberg April 26, 2016 at 10:07 PM
I have a PR up for review. I will be returning to this tomorrow to write a bit about how I landed on this solution and what the perf impact will be.
I don't have gevent or libev installed. Following code is run in my Python shell:
> from cassandra.cluster import Cluster
> cluster = Cluster(protocol_version=1)
> session = cluster.connect(keyspace='foo_keyspace')
I monitored CPU utilization via htop, and I found Python process started using CPU constantly as the connection establised. It seems AsyncoreConnection is looping in a high frequency for events under the hoop. This caused a high load average on my server.
As I don't see any documentation mention about this(sorry if I miss something), I'd like to ask is it a known issue when using asyncore for event loop?