[Varnish] #546: Varnish eating up my memory
Varnish
varnish-bugs at projects.linpro.no
Thu Aug 27 11:14:19 CEST 2009
#546: Varnish eating up my memory
----------------------+-----------------------------------------------------
Reporter: hp197 | Owner: phk
Type: defect | Status: new
Priority: normal | Milestone: Varnish 2.1 release
Component: varnishd | Version: trunk
Severity: normal | Keywords:
----------------------+-----------------------------------------------------
Varnish is eating up my memory for unknown reason.
I told it to not use more than 2G malloc, but top shows my it is using
5.7G
TOP Output:
{{{
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
29529 nobody 18 0 6277m 5.7g 80m S 16.4 24.3 215:40.63
/usr/local/varnish/sbin/varnishd ....... -s malloc,2G .......
}}}
Varnishstats -1:
{{{
uptime 71321 . Child uptime
client_conn 79040520 1108.24 Client connections accepted
client_req 79020353 1107.95 Client requests received
cache_hit 78868507 1105.82 Cache hits
cache_hitpass 0 0.00 Cache hits for pass
cache_miss 141920 1.99 Cache misses
backend_conn 141924 1.99 Backend connections success
backend_unhealthy 0 0.00 Backend connections not
attempted
backend_busy 0 0.00 Backend connections too many
backend_fail 0 0.00 Backend connections failures
backend_reuse 131429 1.84 Backend connections reuses
backend_recycle 134474 1.89 Backend connections recycles
backend_unused 0 0.00 Backend connections unused
n_srcaddr 2 . N struct srcaddr
n_srcaddr_act 18446744073709551317 . N active struct srcaddr
n_sess_mem 172 . N struct sess_mem
n_sess 5085 . N struct sess
n_object 14007 . N struct object
n_objecthead 14012 . N struct objecthead
n_smf 0 . N struct smf
n_smf_frag 0 . N small free smf
n_smf_large 0 . N large free smf
n_vbe_conn 4 . N struct vbe_conn
n_bereq 79 . N struct bereq
n_wrk 10 . N worker threads
n_wrk_create 115 0.00 N worker threads created
n_wrk_failed 0 0.00 N worker threads not created
n_wrk_max 165 0.00 N worker threads limited
n_wrk_queue 0 0.00 N queued work requests
n_wrk_overflow 1694 0.02 N overflowed work requests
n_wrk_drop 0 0.00 N dropped work requests
n_backend 4 . N backends
n_expired 127947 . N expired objects
n_lru_nuked 0 . N LRU nuked objects
n_lru_saved 0 . N LRU saved objects
n_lru_moved 15422829 . N LRU moved objects
n_deathrow 0 . N objects on deathrow
losthdr 472 0.01 HTTP header overflows
n_objsendfile 0 0.00 Objects sent with sendfile
n_objwrite 55193830 773.88 Objects sent with write
n_objoverflow 0 0.00 Objects overflowing workspace
s_sess 79040520 1108.24 Total Sessions
s_req 79040401 1108.23 Total Requests
s_pipe 4 0.00 Total pipe
s_pass 0 0.00 Total pass
s_fetch 141859 1.99 Total fetch
s_hdrbytes 21286131093 298455.31 Total header bytes
s_bodybytes 111229645966 1559563.75 Total body bytes
sess_closed 79040484 1108.24 Session Closed
sess_pipeline 0 0.00 Session Pipeline
sess_readahead 0 0.00 Session Read Ahead
sess_linger 0 0.00 Session Linger
sess_herd 0 0.00 Session herd
shm_records 3260786558 45719.87 SHM records
shm_writes 395398785 5543.93 SHM writes
shm_flushes 10374 0.15 SHM flushes due to overflow
shm_cont 2903710 40.71 SHM MTX contention
shm_cycles 1209 0.02 SHM cycles through buffer
sm_nreq 0 0.00 allocator requests
sm_nobj 0 . outstanding allocations
sm_balloc 0 . bytes allocated
sm_bfree 0 . bytes free
sma_nreq 284408 3.99 SMA allocator requests
sma_nobj 27834 . SMA outstanding allocations
sma_nbytes 160583048 . SMA outstanding bytes
sma_balloc 1495571135 . SMA bytes allocated
sma_bfree 1334988087 . SMA bytes free
sms_nreq 533 0.01 SMS allocator requests
sms_nobj 0 . SMS outstanding allocations
sms_nbytes 0 . SMS outstanding bytes
sms_balloc 221593 . SMS bytes allocated
sms_bfree 221593 . SMS bytes freed
backend_req 141920 1.99 Backend requests made
n_vcl 3 0.00 N vcl total
n_vcl_avail 3 0.00 N vcl available
n_vcl_discard 0 0.00 N vcl discarded
n_purge 73540 . N total active purges
n_purge_add 94376 1.32 N new purges added
n_purge_retire 20836 0.29 N old purges deleted
n_purge_obj_test 16450270 230.65 N objects tested
n_purge_re_test 1229907219 17244.67 N regexps tested against
n_purge_dups 0 0.00 N duplicate purges removed
hcb_nolock 0 0.00 HCB Lookups without lock
hcb_lock 0 0.00 HCB Lookups with lock
hcb_insert 0 0.00 HCB Inserts
esi_parse 0 0.00 Objects ESI parsed (unlock)
esi_errors 0 0.00 ESI parse errors (unlock)
}}}
My memory python program says this:
{{{
5.8 GiB + 1.1 MiB = 5.8 GiB /usr/local/varnish/sbin/varnishd
... -s ... (2)
Private + Shared = RAM used Program
}}}
Varnish version:
{{{
varnishd (varnish-2.0.4)
Copyright (c) 2006-2009 Linpro AS / Verdens Gang AS
}}}
Compile options:
{{{
./configure --enable-static --enable-kqueue --enable-epoll --enable-ports
--disable-jemalloc
}}}
varnish maked with -O2 --march & --mtype optimalizations.
Any ideas why varnish uses this amount of memory?
--
Ticket URL: <http://varnish.projects.linpro.no/ticket/546>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator
More information about the varnish-bugs
mailing list