<div dir="ltr">Could it be that Varnish is not caching those POST requests, and that they are what makes Apache consume a lot of CPU?<div><br></div><div>On MPMs: with PHP prefork is the safest choice, and it will work just fine as long as you have a reasonable config, especially since you have Varnish in front offloading the job of shuffling bytes back to the users.<div><br></div><div>If I were you I'd try to get more data on which requests take a long time, some variant of "varnishncsa -F %D"..</div><div><br></div><div>If you're into using Prometheus for metrics, you can try out this exporter which will give you a lot of insight into which requests take a long time to process: <a href="https://github.com/stigsb/varnish_request_exporter">https://github.com/stigsb/varnish_request_exporter</a> (Prometheus is awesome!)</div><div><br></div><div> - Stig</div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jul 28, 2016 at 6:57 PM, Ayberk Kimsesiz <span dir="ltr"><<a href="mailto:ayberk.kimsesiz@gmail.com" target="_blank">ayberk.kimsesiz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div><b>CPU Monitor: </b></div><div><br></div><div><a href="http://i.imgur.com/5KT1xRu.jpg" target="_blank">http://i.imgur.com/5KT1xRu.jpg</a></div><div><br></div><div><b>Apache status:</b></div><div><br></div><div><table border="0" style="font-family:"times new roman""><tbody><tr><th>Srv</th><th>PID</th><th>Acc</th><th>M</th><th>CPU</th><th>SS</th><th>Req</th><th>Conn</th><th>Child</th><th>Slot</th><th>Client</th><th>Protocol</th><th>VHost</th><th>Request</th></tr><tr><td><b>0-0</b></td><td>-</td><td>0/0/9766</td><td>.</td><td>134.59</td><td>37</td><td>0</td><td>0.0</td><td>0.00</td><td>64.40</td><td>::1</td><td>http/1.1</td><td nowrap>ns1.***com:8080</td><td nowrap>OPTIONS * HTTP/1.0</td></tr><tr><td><b>1-0</b></td><td>14612</td><td>0/16/9058</td><td>_</td><td>17.83</td><td>13</td><td>1498</td><td>0.0</td><td>0.02</td><td>53.29</td><td>176.***.10</td><td>http/1.1</td><td nowrap>www.***.com:8080</td><td nowrap>POST /wp-admin/admin-ajax.php HTTP/1.1</td></tr><tr><td><b>2-0</b></td><td>10863</td><td>0/179/9795</td><td>_</td><td>185.14</td><td>6</td><td>1424</td><td>0.0</td><td>0.58</td><td>60.32</td><td>176.***.10</td><td>http/1.1</td><td nowrap>www.***.com:8080</td><td nowrap>POST /wp-admin/admin-ajax.php HTTP/1.1</td></tr><tr><td><b>3-0</b></td><td>13127</td><td>0/127/9435</td><td>_</td><td>119.80</td><td>4</td><td>1419</td><td>0.0</td><td>0.42</td><td>56.51</td><td>176.***.10</td><td>http/1.1</td><td nowrap>www.***.com:8080</td><td nowrap>POST /wp-admin/admin-ajax.php HTTP/1.1</td></tr><tr><td><b>4-0</b></td><td>-</td><td>0/0/9187</td><td>.</td><td>0.00</td><td>50</td><td>0</td><td>0.0</td><td>0.00</td><td>56.60</td><td>::1</td><td>http/1.1</td><td nowrap>ns1.***.com:8080</td><td nowrap>OPTIONS * HTTP/1.0</td></tr><tr><td><b>5-0</b></td><td>14851</td><td>0/9/8761</td><td>_</td><td>8.95</td><td>13</td><td>1559</td><td>0.0</td><td>0.01</td><td>57.90</td><td>176.***.10</td><td>http/1.1</td><td nowrap>www.***.com:8080</td><td nowrap>POST /wp-admin/admin-ajax.php HTTP/1.1</td></tr><tr><td><b>6-0</b></td><td>14852</td><td>0/6/8130</td><td>_</td><td>6.67</td><td>4</td><td>1482</td><td>0.0</td><td>0.01</td><td>51.88</td><td>176.***.10</td><td>http/1.1</td><td nowrap>www.***.com:8080</td><td nowrap>POST /wp-admin/admin-ajax.php HTTP/1.1</td></tr><tr><td><b>7-0</b></td><td>14192</td><td>11/57/8355</td><td><b>K</b></td><td>72.73</td><td>0</td><td>1363</td><td>106.6</td><td>0.44</td><td>52.79</td><td>176.***.10</td><td>http/1.1</td><td nowrap>www.***.com:8080</td><td nowrap>POST /wp-admin/admin-ajax.php HTTP/1.1</td></tr><tr><td><b>8-0</b></td><td>13067</td><td>0/125/7795</td><td>_</td><td>121.19</td><td>13</td><td>1759</td><td>0.0</td><td>0.65</td><td>68.27</td><td>176.***.10</td><td>http/1.1</td><td nowrap>www.***.com:8080</td><td nowrap>POST /wp-admin/admin-ajax.php HTTP/1.1</td></tr></tbody></table></div><div><br></div><div>Apache error logs don't show anything about CPU.<br></div><div><div><br></div></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-07-28 19:31 GMT+03:00 Guillaume Quintard <span dir="ltr"><<a href="mailto:guillaume@varnish-software.com" target="_blank">guillaume@varnish-software.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You seem to have a good hit ratio, are you seeing anything on the apache logs that would explain the cpu usage?<span><font color="#888888"><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div>-- <br></div>Guillaume Quintard</div></div></div></div></font></span></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Stig Bakken<br>CTO, Zedge.net - free your phone!</div>
</div>