Varnish CPU Usage

Stig Bakken stig at zedge.net
Tue Aug 2 14:07:25 CEST 2016


Could it be that Varnish is not caching those POST requests, and that they
are what makes Apache consume a lot of CPU?

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.

If I were you I'd try to get more data on which requests take a long time,
some variant of "varnishncsa -F %D"..

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: https://github.com/stigsb/varnish_request_exporter (Prometheus
is awesome!)

 - Stig


On Thu, Jul 28, 2016 at 6:57 PM, Ayberk Kimsesiz <ayberk.kimsesiz at gmail.com>
wrote:

> Hi,
>
> *CPU Monitor: *
>
> http://i.imgur.com/5KT1xRu.jpg
>
> *Apache status:*
>
> SrvPIDAccMCPUSSReqConnChildSlotClientProtocolVHostRequest
> *0-0* - 0/0/9766 . 134.59 37 0 0.0 0.00 64.40 ::1 http/1.1 ns1.***com:8080 OPTIONS
> * HTTP/1.0
> *1-0* 14612 0/16/9058 _ 17.83 13 1498 0.0 0.02 53.29 176.***.10 http/1.1
> www.***.com:8080 POST /wp-admin/admin-ajax.php HTTP/1.1
> *2-0* 10863 0/179/9795 _ 185.14 6 1424 0.0 0.58 60.32 176.***.10 http/1.1
> www.***.com:8080 POST /wp-admin/admin-ajax.php HTTP/1.1
> *3-0* 13127 0/127/9435 _ 119.80 4 1419 0.0 0.42 56.51 176.***.10 http/1.1
> www.***.com:8080 POST /wp-admin/admin-ajax.php HTTP/1.1
> *4-0* - 0/0/9187 . 0.00 50 0 0.0 0.00 56.60 ::1 http/1.1 ns1.***.com:8080 OPTIONS
> * HTTP/1.0
> *5-0* 14851 0/9/8761 _ 8.95 13 1559 0.0 0.01 57.90 176.***.10 http/1.1
> www.***.com:8080 POST /wp-admin/admin-ajax.php HTTP/1.1
> *6-0* 14852 0/6/8130 _ 6.67 4 1482 0.0 0.01 51.88 176.***.10 http/1.1
> www.***.com:8080 POST /wp-admin/admin-ajax.php HTTP/1.1
> *7-0* 14192 11/57/8355 *K* 72.73 0 1363 106.6 0.44 52.79 176.***.10
> http/1.1 www.***.com:8080 POST /wp-admin/admin-ajax.php HTTP/1.1
> *8-0* 13067 0/125/7795 _ 121.19 13 1759 0.0 0.65 68.27 176.***.10 http/1.1
> www.***.com:8080 POST /wp-admin/admin-ajax.php HTTP/1.1
>
> Apache error logs don't show anything about CPU.
>
>
> 2016-07-28 19:31 GMT+03:00 Guillaume Quintard <
> guillaume at varnish-software.com>:
>
>> You seem to have a good hit ratio, are you seeing anything on the apache
>> logs that would explain the cpu usage?
>>
>> --
>> Guillaume Quintard
>>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>



-- 
Stig Bakken
CTO, Zedge.net - free your phone!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20160802/d963ccc2/attachment.html>


More information about the varnish-misc mailing list