-
Notifications
You must be signed in to change notification settings - Fork 345
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
high cpu usage #40
Comments
does anybody know anything about this? The high cpu usage causes this to be unable in production. |
What sort of qps are you achieving? Is your app continually opening and
closing database connections? Try out using connection pooling, it is
significantly more efficient all the way down the stack.
One thing you can try, since I noticed from another issue you are compiling
the proxy: you can try to link in pprof and find the hotspots you're
hitting in the code. I'd be happy to look into the bottleneck you're
hitting if you can provide me with data to help track it down.
|
If you're willing to do the legwork to identify the hotspots of your code, you can read through this post about adding pprof to any Go program to automatically profile CPU (and memory) usage. The post is relatively long, but the part you're interested in are adding these lines to func main:
After recompiling the proxy and running it in a scenario where it has encountered the high CPU, kill the proxy process and look through data given by the pprof tool: go tool pprof the-locally-compiled-proxy-executable some-path-to-a-file-you-own.prof There's a few simple commands to look through the data ( |
Please let me know if there's anything you've found related to this problem. I've not heard about this being a problem so I'm going to optimistically close this. Please reopen it if you are still having a problem. |
+1 we have high cpu in GKE and most of the usage is from cloud sql proxy from no reason that make sense |
Can you please answer the questions I asked in the previous posts? It is
not possible to help you with the info you have provided.
…On Thu, Oct 18, 2018, 8:26 AM Iftach Schonbaum ***@***.***> wrote:
+1 we have high cpu in GKE and most of the usage is from cloud sql proxy
from no reason that make sense
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#40 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAiy7xfFHwRgNqCfnrLIu2iBnzHNhWSmks5umJ2OgaJpZM4JSgqC>
.
|
Set application environment variables to production by default
i start the sql proxy using the following command:
When the website is loaded the CPU usage of the proxy rises exponentially. Is there any way around this?
The text was updated successfully, but these errors were encountered: