-
Notifications
You must be signed in to change notification settings - Fork 188
RPC node CPU bottleneck #352
Comments
I think I've tracked one major performance issue: ffef8ba#diff-3648ab6503ed4bb603c9432e9ebc9c2eR852. I've definitely seen the I then ran a full The overall CPU issue remains even after this improvement, so I'm still looking into what else might be done to help.. |
I'm going to make an educated guess that we should also print/log this section only when debug logging is enabled instead of by default. Python doesn't have a |
Performance seems much more acceptable on the latest Great team effort, everyone! |
After further review, this issue is still occurring, so reopening for more profiling and investigation. |
@ixje Could these PRs be applicable? |
@jseagrave21 If you compare the C# code to the python code at the same functions you'll see that python doesn't use any locking mechanism so I'd consider this as |
I too am experiencing issues with CPU load - however, on a multi-core system, it looks like only one thread gets maxed out - in each case I am using python 3.7.0 & venv, on Debian 9.5.0... The CPU load/performance issue seems to be mitigated to some degree by following the advice in https://github.com/CityOfZion/neo-python/blob/master/docs/source/Seedlist.rst and adding reliable peers; I have added several seedX.cityofzio.io hostnames, as those are the only ones familiar to me. I have experimented with setting the maxpeers value as high as 127, and currently lowered it to ~20 per advice of @jseagrave21. However, querying Please let me know if there are any details that I can provide to help. |
Thanks for the input @DaShak. There's some areas where we need to add threading to reduce locking and increase responsiveness of the RPC server. I'll create an issue related to PS: can you let us know which version of neo-python you're experiencing this with? |
I believe you are on target, @ixje - my node with CoZ hosts added to the SeedList has been stable & sync'd for a few days with maxpeers set to ~20 - I suspect neo-python is having issues disconnecting from unhelpful peers. I'm working with the current master branch, which was last updated earlier this month:
|
There used to be multiple reasons for poor performance. Most of them have been resolved after switching to |
Current behavior
CPU is pegged at 100% about 75% of the time on neo-python RPC nodes. Background discussion can be found here:
#346 (comment)
Expected behavior
Normal CPU usage and stable request processing throughput.
How to reproduce
Start up a neo-python RPC node with a default configuration. Once the node is fully sync'd and normal traffic levels are attained, CPU spikes will happen for 45-60 seconds at a time, which makes the node unresponsive.
Your environment
Let us know in what environment you're running into the issue:
Debian Linux, neo-python 0.6.3-dev
The text was updated successfully, but these errors were encountered: