OpenBazaar-Server
OpenBazaar-Server copied to clipboard
CPU hogging
Brief Description:
Operating System (OS and version): Ubuntu 14.04.4 LTS OpenBazaar version: Cloned from the repo Hardware: VPS with 2-core Intel Atom C2750 (2.40GHz)
Reproducible (Always / Almost Always / Sometimes / Rarely / Couldn't Reproduce): Always
Steps to reproduce:
- Run ob
- Do ~anything. For example, I try to "follow" Bazaarbay and CPU usage of the process goes to 100% for a long time (around 10 seconds maybe) and the "follow" is canceled.
Observed Behavior: CPU usage goes to 100%. (Blocks all the incoming requests so the "follow" timeouts?)
Expected Behavior: CPU usage doesn't go to 100%.
Additional info (links, images, etc go here): This shouldn't happen as the server is (I think?) more powerful than for example Raspberry Pi's. Some people AFAIK runs OB on RPi.
I'm also getting frequent periods where 1 (of 4 ) cores is maxed out at 100% for long periods of time as well. Usually it's after navigating through the app. It's always the openbazzard.py process. Is there anyway to determine why it's using a lot of cpu and how to correct? During that time, the client is unresponsive.
I've seen similar behavior. The problem seems to lie with Python which isn't the fastest language around. Always seemed an odd choice to me for this sort of thing. There is a compiled Python now but from what little I know that isn't 100% compatible.
The way things are looking, it looks like the whole daemon needs writing in C/C++/Rust etc. as this is just too sluggish. Even on my 16 core Xeon it's fairly sluggish.