Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgres high CPU #60

Open
electronicmax opened this issue Jul 1, 2019 · 5 comments
Open

postgres high CPU #60

electronicmax opened this issue Jul 1, 2019 · 5 comments

Comments

@electronicmax
Copy link
Member

I've hit the 1million packet mark in the packets table and now i'm getting postgres consistently hitting 44-60% of my CPU - we should keep a watch on this and maybe figure out ways to stress postgres out less

also possibly help it with more RAM / buffers / whatnot?

@mcnutty26
Copy link
Member

mcnutty26 commented Jul 2, 2019

I think this is related to insert performance rather than general db load (I only see this once I start exceeding ~1000 packets/tick).

Commit ff8987e swaps the db insert mechanism from [multiple operations committed together] to [multiple values delivered in the same insert operation]

@mcnutty26
Copy link
Member

Another thing to try if this doesn't do enough - double the length of the commit interval in the configuration file

@electronicmax
Copy link
Member Author

electronicmax commented Jul 23, 2019

this is back to being a bit of a problem.. python+postgres are cooking my machine again (each peaking occasionally at 100% , going down only to 79%)

Screenshot 2019-07-23 at 11 14 09

@electronicmax electronicmax reopened this Jul 23, 2019
@mcnutty26
Copy link
Member

mcnutty26 commented Jul 23, 2019

Is your loop interval set to something reasonable (5+)? Now that the loop is a couple of times faster you don't need to run it as often.

@electronicmax
Copy link
Member Author

Indeed. Loop interval was 3, now 5. Still high CPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants