Varnish CPU Usage

Ayberk Kimsesiz ayberk.kimsesiz at gmail.com
Thu Jul 28 18:26:01 CEST 2016


Hi,

*Varnishlog*

*   Begin          req 11316006 rxreq*
*-   Timestamp      Start: 1469722432.394488 0.000000 0.000000*
*-   Timestamp      Req: 1469722432.394488 0.000000 0.000000*
*-   ReqStart       37.155.54.14 44531*
*-   ReqMethod      GET*
*-   ReqURL
/wp-content/cache/minify/000000/M9QvyC8oLdBNqtQtLi0oriwuyUzWzyrWT84vSgUA.js*
*-   ReqProtocol    HTTP/1.1*
*-   ReqHeader      Host: ******.com*
*-   ReqHeader      Connection: keep-alive*
*-   ReqHeader      Accept: */**
*-   ReqHeader      User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 9_3_3
like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0
Mobile/13G34 Safari/601.1*
*-   ReqHeader      Accept-Language: tr-tr*
*-   ReqHeader      Referer: http://******.com/2015/05/28/iphone-sim/*
*-   ReqHeader      Accept-Encoding: gzip, deflate*
*-   ReqHeader      X-Forwarded-For: 37.155.54.14*
*-   VCL_call       RECV*
*-   ReqHeader      X-Actual-IP: 37.155.54.14*
*-   ReqUnset       X-Forwarded-For: 37.155.54.14*
*-   ReqHeader      X-Forwarded-For: 37.155.54.14, 37.155.54.14*
*-   ReqHeader      Cookie:*
*-   ReqUnset       Cookie:*
*-   ReqHeader      Cookie:*
*-   ReqUnset       X-Forwarded-For: 37.155.54.14, 37.155.54.14*
*-   ReqHeader      X-Forwarded-For: 37.155.54.14, 37.155.54.14,
37.155.54.14*
*-   ReqUnset       Accept-Encoding: gzip, deflate*
*-   ReqHeader      Accept-Encoding: gzip*
*-   ReqUnset       Cookie:*
*-   VCL_return     hash*
*-   VCL_call       HASH*
*-   VCL_return     lookup*
*-   Hit            2159905671*
*-   VCL_call       HIT*
*-   VCL_return     deliver*
*-   RespProtocol   HTTP/1.1*
*-   RespStatus     200*
*-   RespReason     OK*
*-   RespHeader     Date: Thu, 28 Jul 2016 15:39:44 GMT*
*-   RespHeader     Server: Apache/2*
*-   RespHeader     Last-Modified: Thu, 28 Jul 2016 07:01:56 GMT*
*-   RespHeader     ETag: "2086-538acb5a886de-gzip"*
*-   RespHeader     Content-Encoding: gzip*
*-   RespHeader     Cache-Control: public, must-revalidate,
proxy-revalidate*
*-   RespHeader     Expires: Fri, 05 Aug 2016 16:21:56 GMT*
*-   RespHeader     X-Powered-By: W3 Total Cache/0.9.4.1 <http://0.9.4.1>*
*-   RespHeader     Pragma: public*
*-   RespHeader     Content-Length: 2648*
*-   RespHeader     Content-Type: application/x-javascript*
*-   RespHeader     Vary: Accept-Encoding*
*-   RespHeader     X-Varnish: 10925524 12422023*
*-   RespHeader     Age: 2048*
*-   RespHeader     Via: 1.1 varnish-v4*
*-   VCL_call       DELIVER*
*-   RespHeader     X-Cache: HIT*
*-   VCL_return     deliver*
*-   Timestamp      Process: 1469722432.394522 0.000034 0.000034*
*-   Debug          "RES_MODE 2"*
*-   RespHeader     Connection: keep-alive*
*-   RespHeader     Accept-Ranges: bytes*
*-   Timestamp      Resp: 1469722432.394532 0.000044 0.000009*
*-   Debug          "XXX REF 2"*
*-   ReqAcct        437 0 437 536 2648 3184*
*-   End*

*Varnishstat*

*Uptime mgt:   7+16:11:24
                Hitrate n:       10       15       15*
*Uptime child: 1+05:05:54
                   avg(n):   0.9377   0.9307   0.9307*

*  NAME                                                  CURRENT
CHANGE      AVERAGE       AVG_10      AVG_100     AVG_1000*
*MAIN.uptime                                              104754
1.00         1.00         1.00         1.00         1.00*
*MAIN.sess_conn                                        945720        10.98
        9.00         8.95         8.85         8.85*
*MAIN.client_req                                         3194781
 54.91        30.00        71.19        72.71        72.71*
*MAIN.cache_hit                                          2958915
 50.92        28.00        69.23        70.78        70.78*
*MAIN.cache_miss                                      38356         1.00
       .  0.17         0.14         0.14*
*MAIN.backend_conn                                  53745         0.00
     0.50         0.50         0.50*
*MAIN.backend_fail                                     1
0.00           0.00         0.00         0.00*
*MAIN.backend_reuse                                181395         2.00
    1.00         1.20         1.14         1.14*
*MAIN.backend_toolate                              51712        0.00
   .           0.62         0.64         0.64*
*MAIN.backend_recycle                             233110      3.00
2.00         2.04         2.00         2.00*
*MAIN.backend_retry                                 44            0.00
     .           0.00         0.00         0.00*
*MAIN.fetch_head                                     16             0.00
       .           0.00         0.00         0.00*
*MAIN.fetch_length                                    216684      3.00
    2.00         2.04         2.00         2.00*
*MAIN.fetch_chunked                                17377      0.00
 .           0.00         0.00         0.00*
*MAIN.fetch_close                                      57           0.00
       .           0.00         0.00         0.00*
*MAIN.fetch_304                                        591         0.00
     .           0.00         0.00         0.00*
*MAIN.pools                                                2
 0.00          .           2.00         2.00         2.00*
*MAIN.threads                                            100         0.00
       .         100.00       100.00       100.00*
*MAIN.threads_limited                                1             0.00
     .           0.00         0.00         0.00*
*MAIN.threads_created                               402         0.00
   .           0.00         0.00         0.00*
*MAIN.threads_destroyed                           302         0.00
 .           0.00         0.00         0.00*
*MAIN.busy_sleep                                      280         0.00
     .           0.00         0.00         0.00*
*MAIN.busy_wakeup                                  280         0.00
 .           0.00         0.00         0.00*
*MAIN.sess_queued                                   307         0.00
   .           0.00         0.00         0.00*
*MAIN.n_object                                          38125      0.00
     .       38122.79     38122.60     38122.60*


*Default.vcl*

*vcl 4.0;*
*import std;*

*backend default {*
*  .host = "MY SERVER IP";*
*  .port = "8080";*

*Varnish*

*# Configuration file for varnish*
*#*
*# /etc/init.d/varnish expects the variable $DAEMON_OPTS to be set from
this*
*# shell script fragment.*
*#*

*# Maximum number of open files (for ulimit -n)*
*NFILES=131072*

*# Locked shared memory (for ulimit -l)*
*# Default log size is 82MB + header*
*MEMLOCK=82000*

*# Maximum number of threads (for ulimit -u)*
*NPROCS="unlimited"*

*# Maximum size of corefile (for ulimit -c). Default in Fedora is 0*
*# DAEMON_COREFILE_LIMIT="unlimited"*

*# Set this to 1 to make init script reload try to switch vcl without
restart.*
*# To make this work, you need to set the following variables*
*# explicit: VARNISH_VCL_CONF, VARNISH_ADMIN_LISTEN_ADDRESS,*
*# VARNISH_ADMIN_LISTEN_PORT, VARNISH_SECRET_FILE, or in short,*
*# use Alternative 3, Advanced configuration, below*
*RELOAD_VCL=1*

*# This file contains 4 alternatives, please use only one.*

*## Alternative 1, Minimal configuration, no VCL*
*#*
*# Listen on port 6081, administration on localhost:6082, and forward to*
*# content server on localhost:8080.  Use a fixed-size cache file.*
*#*
*#DAEMON_OPTS="-a :6081 \*
*#             -T localhost:6082 \*
*#             -b localhost:8080 \*
*#             -u varnish -g varnish \*
*#             -s file,/var/lib/varnish/varnish_storage.bin,1G"*


*## Alternative 2, Configuration with VCL*
*#*
*# Listen on port 6081, administration on localhost:6082, and forward to*
*# one content server selected by the vcl file, based on the request.  Use
a*
*# fixed-size cache file.*
*#*
*#DAEMON_OPTS="-a :80 \*
*#               -T localhost:6082 \*
*#               -f /etc/varnish/default.vcl \*
*#               -S /etc/varnish/secret \*
*#               -s malloc,2G"*


*## Alternative 3, Advanced configuration*
*#*
*# See varnishd(1) for more information.*
*#*
*# # Main configuration file. You probably want to change it :)*
*VARNISH_VCL_CONF=/etc/varnish/default.vcl*
*#*
*# # Default address and port to bind to*
*# # Blank address means all IPv4 and IPv6 interfaces, otherwise specify*
*# # a host name, an IPv4 dotted quad, or an IPv6 address in brackets.*
*# VARNISH_LISTEN_ADDRESS=*
*VARNISH_LISTEN_PORT=80*
*#*
*# # Telnet admin interface listen address and port*
*VARNISH_ADMIN_LISTEN_ADDRESS=127.0.0.1*
*VARNISH_ADMIN_LISTEN_PORT=6082*
*#*
*# # Shared secret file for admin interface*
*VARNISH_SECRET_FILE=/etc/varnish/secret*
*#*
*# # The minimum number of worker threads to start*
*VARNISH_MIN_THREADS=50*
*#*
*# # The Maximum number of worker threads to start*
*VARNISH_MAX_THREADS=1000*
*#*
*# # Idle timeout for worker threads*
*VARNISH_THREAD_TIMEOUT=120*
*#*
*# # Cache file size: in bytes, optionally using k / M / G / T suffix,*
*# # or in percentage of available disk space using the % suffix.*
*VARNISH_STORAGE_SIZE=4G*
*#*
*# # Backend storage specification*
*VARNISH_STORAGE="malloc,${VARNISH_STORAGE_SIZE}"*
*#*
*# # Default TTL used when the backend does not specify one*
*VARNISH_TTL=120*
*#*
*# # DAEMON_OPTS is used by the init script.  If you add or remove options,
make*
*# # sure you update this section, too.*
*DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \*
*             -f ${VARNISH_VCL_CONF} \*
*             -T
${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \*
*             -t ${VARNISH_TTL} \*
*             -p thread_pool_min=${VARNISH_MIN_THREADS} \*
*             -p thread_pool_max=${VARNISH_MAX_THREADS} \*
*             -p thread_pool_timeout=${VARNISH_THREAD_TIMEOUT} \*
*             -u varnish -g varnish \*
*             -S ${VARNISH_SECRET_FILE} \*
*             -s ${VARNISH_STORAGE}"*
*#*


*## Alternative 4, Do It Yourself. See varnishd(1) for more information.*
*#*
*# DAEMON_OPTS=""*



2016-07-28 19:08 GMT+03:00 Guillaume Quintard <
guillaume at varnish-software.com>:

> can you pastebin your vcl? and maybe a varnishlog?
>
> --
> Guillaume Quintard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20160728/eca65510/attachment-0001.html>


More information about the varnish-misc mailing list