Analyze uwsgi strace log to find out why it takes high CPU usageLong connection times from PHP to MySQL on EC2How do I allow mysqld to use more than 24.9% of my cpu?mysql - abnormally high CPU usageNginx php-fpm high cpu usageMongoDB high CPU usagenginx can't execute many requestsUbuntu 12.04 high cpu usagephp-fpm and nginx @ high CPU usage?PHP High CPU usagephp5.6-fpm high cpu usage
Multi tool use
Will 700 more planes a day fly because of the Heathrow expansion?
What are the advantages of luxury car brands like Acura/Lexus over their sibling non-luxury brands Honda/Toyota?
Out of scope work duties and resignation
What to use instead of cling film to wrap pastry
Word meaning as function of the composition of its phonemes
Can my company stop me from working overtime?
Nominativ or Akkusativ
Adjacent DEM color matching in QGIS
29er Road Tire?
Why is "breaking the mould" positively connoted?
What was the first story to feature the plot "the monsters were human all along"?
How can I get a job without pushing my family's income into a higher tax bracket?
Are Finitely generated modules over a ring also finitely generated over a subring containing the identity?
Where can I go to avoid planes overhead?
List of newcommands used
Are the Night's Watch still required?
IP addresses from public IP block in my LAN
Causes of bimodal distributions when bootstrapping a meta-analysis model
Identifying characters
How should I tell my manager I'm not paying for an optional after work event I'm not going to?
Word for Food that's Gone 'Bad', but is Still Edible?
Are pressure-treated posts that have been submerged for a few days ruined?
Copy previous line to current line from text file
60s/70s science fiction novel where a man (after years of trying) finally succeeds to make a coin levitate by sheer concentration
Analyze uwsgi strace log to find out why it takes high CPU usage
Long connection times from PHP to MySQL on EC2How do I allow mysqld to use more than 24.9% of my cpu?mysql - abnormally high CPU usageNginx php-fpm high cpu usageMongoDB high CPU usagenginx can't execute many requestsUbuntu 12.04 high cpu usagephp-fpm and nginx @ high CPU usage?PHP High CPU usagephp5.6-fpm high cpu usage
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm running a django site with nginx through uwsgi. The problem is uwsgi process take a lot of CPU time when traffic become heavy. The same configuration works fine on test server and siege/ab simulate heavy concurrent traffic.
Here is one strace log of uwsgi process. http://dl.dropbox.com/u/43017476/strace.log
And some sysctl:
fs.file-max = 128000
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.core.netdev_max_backlog = 4096
net.ipv4.tcp_max_syn_backlog = 4096
net.core.somaxconn = 250000
net.ipv4.tcp_keepalive_time = 300
nginx conf is pretty same as other tutorials from Google. I have been trying to figure it out but no luck. However I found a lot of this pieces:
22:12:02.932276 read(8, "722", 16384) = 11
22:12:02.932504 poll([fd=8, events=POLLIN], 1, 0) = 0 (Timeout)
22:12:02.932547 write(8, "173SET NAMES utf8", 19) = 19
22:12:02.932643 read(8, "712", 16384) = 11
22:12:02.933237 poll([fd=8, events=POLLIN], 1, 0) = 0 (Timeout)
22:12:02.933279 write(8, "213set autocommit=0", 21) = 21
22:12:02.933330 read(8, "71", 16384) = 11
Whereas file descriptor 8 is a mysql socket. But Mysql server seems working pretty fine. I can see each "read" system call consumes most CPU time but don't know what's going wrong here. The same database server has been serving former PHP site without problem.
Any ideas appreciated.
ubuntu mysql nginx django uwsgi
add a comment |
I'm running a django site with nginx through uwsgi. The problem is uwsgi process take a lot of CPU time when traffic become heavy. The same configuration works fine on test server and siege/ab simulate heavy concurrent traffic.
Here is one strace log of uwsgi process. http://dl.dropbox.com/u/43017476/strace.log
And some sysctl:
fs.file-max = 128000
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.core.netdev_max_backlog = 4096
net.ipv4.tcp_max_syn_backlog = 4096
net.core.somaxconn = 250000
net.ipv4.tcp_keepalive_time = 300
nginx conf is pretty same as other tutorials from Google. I have been trying to figure it out but no luck. However I found a lot of this pieces:
22:12:02.932276 read(8, "722", 16384) = 11
22:12:02.932504 poll([fd=8, events=POLLIN], 1, 0) = 0 (Timeout)
22:12:02.932547 write(8, "173SET NAMES utf8", 19) = 19
22:12:02.932643 read(8, "712", 16384) = 11
22:12:02.933237 poll([fd=8, events=POLLIN], 1, 0) = 0 (Timeout)
22:12:02.933279 write(8, "213set autocommit=0", 21) = 21
22:12:02.933330 read(8, "71", 16384) = 11
Whereas file descriptor 8 is a mysql socket. But Mysql server seems working pretty fine. I can see each "read" system call consumes most CPU time but don't know what's going wrong here. The same database server has been serving former PHP site without problem.
Any ideas appreciated.
ubuntu mysql nginx django uwsgi
add a comment |
I'm running a django site with nginx through uwsgi. The problem is uwsgi process take a lot of CPU time when traffic become heavy. The same configuration works fine on test server and siege/ab simulate heavy concurrent traffic.
Here is one strace log of uwsgi process. http://dl.dropbox.com/u/43017476/strace.log
And some sysctl:
fs.file-max = 128000
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.core.netdev_max_backlog = 4096
net.ipv4.tcp_max_syn_backlog = 4096
net.core.somaxconn = 250000
net.ipv4.tcp_keepalive_time = 300
nginx conf is pretty same as other tutorials from Google. I have been trying to figure it out but no luck. However I found a lot of this pieces:
22:12:02.932276 read(8, "722", 16384) = 11
22:12:02.932504 poll([fd=8, events=POLLIN], 1, 0) = 0 (Timeout)
22:12:02.932547 write(8, "173SET NAMES utf8", 19) = 19
22:12:02.932643 read(8, "712", 16384) = 11
22:12:02.933237 poll([fd=8, events=POLLIN], 1, 0) = 0 (Timeout)
22:12:02.933279 write(8, "213set autocommit=0", 21) = 21
22:12:02.933330 read(8, "71", 16384) = 11
Whereas file descriptor 8 is a mysql socket. But Mysql server seems working pretty fine. I can see each "read" system call consumes most CPU time but don't know what's going wrong here. The same database server has been serving former PHP site without problem.
Any ideas appreciated.
ubuntu mysql nginx django uwsgi
I'm running a django site with nginx through uwsgi. The problem is uwsgi process take a lot of CPU time when traffic become heavy. The same configuration works fine on test server and siege/ab simulate heavy concurrent traffic.
Here is one strace log of uwsgi process. http://dl.dropbox.com/u/43017476/strace.log
And some sysctl:
fs.file-max = 128000
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.core.netdev_max_backlog = 4096
net.ipv4.tcp_max_syn_backlog = 4096
net.core.somaxconn = 250000
net.ipv4.tcp_keepalive_time = 300
nginx conf is pretty same as other tutorials from Google. I have been trying to figure it out but no luck. However I found a lot of this pieces:
22:12:02.932276 read(8, "722", 16384) = 11
22:12:02.932504 poll([fd=8, events=POLLIN], 1, 0) = 0 (Timeout)
22:12:02.932547 write(8, "173SET NAMES utf8", 19) = 19
22:12:02.932643 read(8, "712", 16384) = 11
22:12:02.933237 poll([fd=8, events=POLLIN], 1, 0) = 0 (Timeout)
22:12:02.933279 write(8, "213set autocommit=0", 21) = 21
22:12:02.933330 read(8, "71", 16384) = 11
Whereas file descriptor 8 is a mysql socket. But Mysql server seems working pretty fine. I can see each "read" system call consumes most CPU time but don't know what's going wrong here. The same database server has been serving former PHP site without problem.
Any ideas appreciated.
ubuntu mysql nginx django uwsgi
ubuntu mysql nginx django uwsgi
edited Nov 10 '11 at 7:08
quanta
43.5k15114196
43.5k15114196
asked Nov 9 '11 at 21:46
chenxeechenxee
214
214
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
strace likely will not show you what is consuming CPU time as it shows system calls. The CPU time that a process is shown to consume is time that is spent executing code in the application itself. The read/write/poll you are showing is very likely normal MySQL communication, or is the application polling the mysql FD (non-blocking) to look for new traffic.
I don't really have a solution for you as to how to find the cause of your high CPU, however I figured I would point you away from spending too much time looking for the answer in strace output :)
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f329494%2fanalyze-uwsgi-strace-log-to-find-out-why-it-takes-high-cpu-usage%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
strace likely will not show you what is consuming CPU time as it shows system calls. The CPU time that a process is shown to consume is time that is spent executing code in the application itself. The read/write/poll you are showing is very likely normal MySQL communication, or is the application polling the mysql FD (non-blocking) to look for new traffic.
I don't really have a solution for you as to how to find the cause of your high CPU, however I figured I would point you away from spending too much time looking for the answer in strace output :)
add a comment |
strace likely will not show you what is consuming CPU time as it shows system calls. The CPU time that a process is shown to consume is time that is spent executing code in the application itself. The read/write/poll you are showing is very likely normal MySQL communication, or is the application polling the mysql FD (non-blocking) to look for new traffic.
I don't really have a solution for you as to how to find the cause of your high CPU, however I figured I would point you away from spending too much time looking for the answer in strace output :)
add a comment |
strace likely will not show you what is consuming CPU time as it shows system calls. The CPU time that a process is shown to consume is time that is spent executing code in the application itself. The read/write/poll you are showing is very likely normal MySQL communication, or is the application polling the mysql FD (non-blocking) to look for new traffic.
I don't really have a solution for you as to how to find the cause of your high CPU, however I figured I would point you away from spending too much time looking for the answer in strace output :)
strace likely will not show you what is consuming CPU time as it shows system calls. The CPU time that a process is shown to consume is time that is spent executing code in the application itself. The read/write/poll you are showing is very likely normal MySQL communication, or is the application polling the mysql FD (non-blocking) to look for new traffic.
I don't really have a solution for you as to how to find the cause of your high CPU, however I figured I would point you away from spending too much time looking for the answer in strace output :)
answered Aug 7 '12 at 22:31
FliesLikeABrickFliesLikeABrick
18615
18615
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f329494%2fanalyze-uwsgi-strace-log-to-find-out-why-it-takes-high-cpu-usage%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
MQUG14UBLj IysF,OGSaDC4t3ONO,jxqT3Qv1QWt,CjHKvvY tn78a,lKu8UbUUFn,eVi