我们在varnishstat中的shm_flushes值非常高:
Hitrate ratio: 0 0 0
Hitrate avg: 0.0000 0.0000 0.0000
3900996 90.85 inf backend_busy - Backend conn. too many
12498808 228.62 inf backend_reuse - Backend conn. reuses
9950893 186.69 inf backend_toolate - Backend conn. was closed
35649 0.00 inf backend_recycle - Backend conn. recycles
733236 10.98 inf backend_retry - Backend conn. retry
94911 0.00 inf fetch_head - Fetch head
468 0.00 inf fetch_eof - Fetch EOF
1962214 25.96 inf fetch_bad - Fetch had bad headers
16922 0.00 inf fetch_close - Fetch wanted close
1979182 34.94 inf fetch_oldhttp - Fetch pre HTTP/1.1 closed
26 0.00 inf fetch_zero - Fetch zero len
927 0.00 inf fetch_failed - Fetch failed
1260014 29.95 inf fetch_1xx - Fetch no body (1xx)
332729 5.99 inf fetch_204 - Fetch no body (204)
7341 . . n_sess - N struct sess
112 . . n_objectcore - N struct objectcore
456054 . . n_vbc - N struct vbc
762 . . n_wrk - N worker threads
427 -40.93 inf n_wrk_create - N worker threads created
368860 -2.00 inf n_wrk_failed - N worker threads not created
368974 2.00 inf n_wrk_lqueue - work request queue length
361762 11.98 inf n_wrk_queued - N queued work requests
115 0.00 inf n_wrk_drop - N dropped work requests
42 . . n_backend - N backends
115 . . n_expired - N expired objects
2747 . . n_lru_nuked - N LRU nuked objects
18073 0.00 inf n_objwrite - Objects sent with write
14 0.00 inf s_sess - Total Sessions
364370 12.98 inf s_req - Total Requests
7843107 119.80 inf s_pass - Total pass
9802175 187.68 inf s_bodybytes - Total body bytes
3900985 108.82 inf sess_pipeline - Session Pipeline
12498808 228.62 inf sess_readahead - Session Read Ahead
6 0.00 inf sess_linger - Session Linger
1323887 26.95 inf sess_herd - Session herd
2056953 37.94 inf shm_records - SHM records
4873964594 91989.09 inf shm_writes - SHM writes
304821503001 6421550.43 inf shm_flushes - SHM flushes due to overflow
1057284 31.95 inf shm_cont - SHM MTX contention
102 0.00 inf shm_cycles - SHM cycles through buffer
94 0.00 inf sms_nreq - SMS allocator requests
11853499 . . sms_nobj - SMS outstanding allocations
10496270 . . sms_nbytes - SMS outstanding bytes
655590062 . . sms_balloc - SMS bytes allocated
38937693 . . sms_bfree - SMS bytes freed
211416 2.00 inf n_vcl - N vcl total
302 0.00 inf n_vcl_avail - N vcl available
24886 0.00 inf n_vcl_discard - N vcl discarded
10704338 0.00 inf n_ban_add - N new bans added
10704338 0.00 inf n_ban_retire - N old bans deleted
2057082 25.96 inf n_ban_obj_test - N objects tested
3 0.00 inf n_ban_re_test - N regexps tested against
3 0.00 inf n_ban_dups - N duplicate bans removed
2 0.00 inf hcb_lock - HCB Lookups with lock
1 0.00 inf hcb_insert - HCB Inserts
2 0.00 inf esi_errors - ESI parse errors (unlock)
535 0.00 inf accept_fail - Accept failures
535 0.00 inf client_drop_late - Connection dropped late
10718794 175.70 inf dir_dns_lookups - DNS director lookups
610318 4.99 inf dir_dns_failed - DNS director failed lookups
610316 4.99 inf dir_dns_hit - DNS director cached lookups hit
同样,hitrate显示为0,但我们肯定会在Varnish中缓存命中,我们可以在回复和varnishlog中看到
我们在DAEMON_OPTS中尝试了-p shm_workspace = 16384,但shm_flushes仍在增加。
不应该是shm_flushes的值接近0吗?
答案 0 :(得分:1)
此列表/输出没有意义。
shm_flushes应与shm_records的顺序相同。每秒640万,显然不是。
我怀疑你使用了错误版本的libvarnishapi。
答案 1 :(得分:1)
我会更关心 inf backend_busy - Backend conn。首先是太多。而且你的Hitrate比率是0 0 0。
我有类似的问题,没有正确报告的统计数据:由于某种原因,我安装了libvarnishapi-dev而不是libvarnishapi1 lib,也可能是错误的版本。
在我完成sudo app-install libvarnishapi1
并重启后,我没有得到 backend_busy - 后端连接。太多了,我的时钟现在也在varnishstat
滴答。
当你到达那里时,看看你的shm_flushes是否仍然太高。