<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Title" content="">
<meta name="Keywords" content="">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Arial;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Courier New";
        panose-1:2 7 3 9 2 2 5 2 4 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:DengXian;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
code
        {mso-style-priority:99;
        font-family:"Courier New",serif;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New",serif;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Courier;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.msoIns
        {mso-style-type:export-only;
        mso-style-name:"";
        text-decoration:underline;
        color:teal;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:595.0pt 842.0pt;
        margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body bgcolor="white" lang="EN-GB" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">If it’s the same two cores, it might be another process that uses the same two cores and thus happens to max out.<o:p></o:p></p>
<p class="MsoNormal">One very likely possibility would be interrupts from e.g. networking. You can check /proc/interrupts to see where interrupts from the network happens.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:36.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">nginx <nginx-bounces@nginx.org> on behalf of Raffael Vogler <raffael.vogler@yieldlove.com><br>
<b>Reply-To: </b>"nginx@nginx.org" <nginx@nginx.org><br>
<b>Date: </b>Thursday, 11 January 2018 at 11.14<br>
<b>To: </b>"nginx@nginx.org" <nginx@nginx.org><br>
<b>Subject: </b>2 of 16 cores are constantly maxing out - how to balance the load?<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:36.0pt">Hello!<br>
<br>
I have nginx with php-fpm running on a 16 core Ubuntu 16.04 instance. The server is handling more than 10 million requests per hour.<br>
<br>
<a href="https://imgur.com/a/iRZ7V">https://imgur.com/a/iRZ7V</a><o:p></o:p></p>
<div>
<div>
<p style="margin-left:36.0pt">As you can see on the htop screenshot cores 6 and 7 are maxed out and that's the case constantly - even after restarting nginx those two cores stay at that level.
<o:p></o:p></p>
<p style="margin-left:36.0pt">I wonder why is that so and how to balance the load more evenly?<o:p></o:p></p>
<p style="margin-left:36.0pt">Also I'm curious to know whether this might indicate a performance relevant issue or if it is most likely harmless and just looks odd.<o:p></o:p></p>
<pre style="margin-left:36.0pt"><code>> cat /etc/nginx/nginx.conf | grep -v '^\s*#'<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code><o:p> </o:p></code></pre>
<pre style="margin-left:36.0pt"><code>user www-data;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>worker_processes auto;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>pid /run/nginx.pid;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>events {<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        worker_connections 768;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>}<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>http {<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        sendfile on;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        tcp_nopush on;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        tcp_nodelay on;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        keepalive_timeout 65;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        types_hash_max_size 2048;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        include /etc/nginx/mime.types;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        default_type application/octet-stream;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        ssl_prefer_server_ciphers on;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        access_log /var/log/nginx/access.log;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        error_log /var/log/nginx/error.log;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        gzip on;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        gzip_disable "msie6";<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        include /etc/nginx/conf.d/*.conf;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>        include /etc/nginx/sites-enabled/*;<o:p></o:p></code></pre>
<pre style="margin-left:36.0pt"><code>}</code><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><code><span style="font-family:"Arial",sans-serif">Thanks</span></code><o:p></o:p></pre>
<pre style="margin-left:36.0pt"><code><span style="font-family:"Arial",sans-serif">Raffael</span></code><o:p></o:p></pre>
</div>
</div>
</div>
</div>
</body>
</html>