Re: eviction problem :: -f value
-f is very hard to tune. you need to actually look at what the overhead is on each slab class. If you want to reduce evictions the first thing you should try is the latest version. There're a lot of changes to improve memory efficiency, which may just fix your problem without you having to do anything else. On Mon, 15 Jan 2018, farzan.dal...@bamilo.com wrote: > Hi Guys > we use Memcached 1.4.21 and we got a lot of evictions I try to change -f to > 1.1 for preventing evictions, is it okay to change -f value or should I try > another method. > > > here our stats , stats slabs, and stats items detail with default -f 1.25 > value: > > Stats > === > STAT uptime 4860763 > STAT time 1516088646 > STAT version 1.4.21 > STAT libevent 2.0.21-stable > STAT pointer_size 64 > STAT rusage_user 50141.684000 > STAT rusage_system 109435.872000 > STAT curr_connections 211 > STAT total_connections 56669879 > STAT connection_structures 433 > STAT reserved_fds 20 > STAT cmd_get 19743709498 > STAT cmd_set 107396338 > STAT cmd_flush 0 > STAT cmd_touch 0 > STAT get_hits 17430338962 > STAT get_misses 2313370536 > STAT delete_misses 4312232 > STAT delete_hits 329854 > STAT incr_misses 39752 > STAT incr_hits 26636222 > STAT decr_misses 0 > STAT decr_hits 0 > STAT cas_misses 0 > STAT cas_hits 0 > STAT cas_badval 0 > STAT touch_hits 0 > STAT touch_misses 0 > STAT auth_cmds 0 > STAT auth_errors 0 > STAT bytes_read 1457584516608 > STAT bytes_written 17191545528667 > STAT limit_maxbytes 27936161792 > STAT accepting_conns 1 > STAT listen_disabled_num 0 > STAT threads 4 > STAT conn_yields 0 > STAT hash_power_level 21 > STAT hash_bytes 16777216 > STAT hash_is_expanding 0 > STAT malloc_fails 0 > STAT bytes 19633850636 > STAT curr_items 2056999 > STAT total_items 107479673 > STAT expired_unfetched 20124151 > STAT evicted_unfetched 2609363 > STAT evictions 2761292 > STAT reclaimed 20778774 > STAT crawler_reclaimed 0 > STAT lrutail_reflocked 0 > > Stats Slabs > === > STAT 1:chunk_size 96 > STAT 1:chunks_per_page 10922 > STAT 1:total_pages 2 > STAT 1:total_chunks 21844 > STAT 1:used_chunks 14823 > STAT 1:free_chunks 7021 > STAT 1:free_chunks_end 0 > STAT 1:mem_requested 1383893 > STAT 1:get_hits 40833927 > STAT 1:cmd_set 17427307 > STAT 1:delete_hits 3 > STAT 1:incr_hits 26637054 > STAT 1:decr_hits 0 > STAT 1:cas_hits 0 > STAT 1:cas_badval 0 > STAT 1:touch_hits 0 > STAT 2:chunk_size 120 > STAT 2:chunks_per_page 8738 > STAT 2:total_pages 11 > STAT 2:total_chunks 96118 > STAT 2:used_chunks 96117 > STAT 2:free_chunks 1 > STAT 2:free_chunks_end 0 > STAT 2:mem_requested 10621909 > STAT 2:get_hits 104399912 > STAT 2:cmd_set 3074153 > STAT 2:delete_hits 94 > STAT 2:incr_hits 0 > STAT 2:decr_hits 0 > STAT 2:cas_hits 0 > STAT 2:cas_badval 0 > STAT 2:touch_hits 0 > STAT 3:chunk_size 152 > STAT 3:chunks_per_page 6898 > STAT 3:total_pages 40 > STAT 3:total_chunks 275920 > STAT 3:used_chunks 275916 > STAT 3:free_chunks 4 > STAT 3:free_chunks_end 0 > STAT 3:mem_requested 39608720 > STAT 3:get_hits 43871158 > STAT 3:cmd_set 24375338 > STAT 3:delete_hits 37175 > STAT 3:incr_hits 0 > STAT 3:decr_hits 0 > STAT 3:cas_hits 0 > STAT 3:cas_badval 0 > STAT 3:touch_hits 0 > STAT 4:chunk_size 192 > STAT 4:chunks_per_page 5461 > STAT 4:total_pages 5 > STAT 4:total_chunks 27305 > STAT 4:used_chunks 27177 > STAT 4:free_chunks 128 > STAT 4:free_chunks_end 0 > STAT 4:mem_requested 4504231 > STAT 4:get_hits 77131349 > STAT 4:cmd_set 4175673 > STAT 4:delete_hits 678 > STAT 4:incr_hits 0 > STAT 4:decr_hits 0 > STAT 4:cas_hits 0 > STAT 4:cas_badval 0 > STAT 4:touch_hits 0 > STAT 5:chunk_size 240 > STAT 5:chunks_per_page 4369 > STAT 5:total_pages 6 > STAT 5:total_chunks 26214 > STAT 5:used_chunks 26053 > STAT 5:free_chunks 161 > STAT 5:free_chunks_end 0 > STAT 5:mem_requested 5636482 > STAT 5:get_hits 86480913 > STAT 5:cmd_set 3359559 > STAT 5:delete_hits 267 > STAT 5:incr_hits 0 > STAT 5:decr_hits 0 > STAT 5:cas_hits 0 > STAT 5:cas_badval 0 > STAT 5:touch_hits 0 > STAT 6:chunk_size 304 > STAT 6:chunks_per_page 3449 > STAT 6:total_pages 6 > STAT 6:total_chunks 20694 > STAT 6:used_chunks 20485 > STAT 6:free_chunks 209 > STAT 6:free_chunks_end 0 > STAT 6:mem_requested 5577183 > STAT 6:get_hits 14209154 > STAT 6:cmd_set 1546280 > STAT 6:delete_hits 1461 > STAT 6:incr_hits 0 > STAT 6:decr_hits 0 > STAT 6:cas_hits 0 > STAT 6:cas_badval 0 > STAT 6:touch_hits 0 > STAT 7:chunk_size 384 > STAT 7:chunks_per_page 2730 > STAT 7:total_pages 15 > STAT 7:total_chunks 40950 > STAT 7:used_chunks 40846 > STAT 7:free_chunks 104 > STAT 7:free_chunks_end 0 > STAT 7:mem_requested 14051313 > STAT 7:get_hits 110315659 > STAT 7:cmd_set 1759382 > STAT 7:delete_hits 423 > STAT 7:incr_hits 0 > STAT 7:decr_hits 0 > STAT 7:cas_hits 0 > STAT 7:cas_badval 0 > STAT 7:touch_hits 0 > STAT 8:chunk_size 480 > STAT 8:chunks_per_page 2184 > STAT 8:total_pages 17 > STAT 8:total_chunks 37128 > STAT 8:used_chunks 37123 > STAT 8:f
Re: eviction problem :: -f value
Thanks dormando for the quick response, how can I check for the overhead of slabs, I get confused a little. On Tue, Jan 16, 2018 at 11:30 AM, dormando wrote: > -f is very hard to tune. you need to actually look at what the overhead is > on each slab class. > > If you want to reduce evictions the first thing you should try is the > latest version. There're a lot of changes to improve memory efficiency, > which may just fix your problem without you having to do anything else. > > On Mon, 15 Jan 2018, farzan.dal...@bamilo.com wrote: > > > Hi Guys > > we use Memcached 1.4.21 and we got a lot of evictions I try to change -f > to 1.1 for preventing evictions, is it okay to change -f value or should I > try > > another method. > > > > > > here our stats , stats slabs, and stats items detail with default -f > 1.25 value: > > > > Stats > > === > > STAT uptime 4860763 > > STAT time 1516088646 > > STAT version 1.4.21 > > STAT libevent 2.0.21-stable > > STAT pointer_size 64 > > STAT rusage_user 50141.684000 > > STAT rusage_system 109435.872000 > > STAT curr_connections 211 > > STAT total_connections 56669879 > > STAT connection_structures 433 > > STAT reserved_fds 20 > > STAT cmd_get 19743709498 > > STAT cmd_set 107396338 > > STAT cmd_flush 0 > > STAT cmd_touch 0 > > STAT get_hits 17430338962 > > STAT get_misses 2313370536 > > STAT delete_misses 4312232 > > STAT delete_hits 329854 > > STAT incr_misses 39752 > > STAT incr_hits 26636222 > > STAT decr_misses 0 > > STAT decr_hits 0 > > STAT cas_misses 0 > > STAT cas_hits 0 > > STAT cas_badval 0 > > STAT touch_hits 0 > > STAT touch_misses 0 > > STAT auth_cmds 0 > > STAT auth_errors 0 > > STAT bytes_read 1457584516608 > > STAT bytes_written 17191545528667 > > STAT limit_maxbytes 27936161792 > > STAT accepting_conns 1 > > STAT listen_disabled_num 0 > > STAT threads 4 > > STAT conn_yields 0 > > STAT hash_power_level 21 > > STAT hash_bytes 16777216 > > STAT hash_is_expanding 0 > > STAT malloc_fails 0 > > STAT bytes 19633850636 > > STAT curr_items 2056999 > > STAT total_items 107479673 > > STAT expired_unfetched 20124151 > > STAT evicted_unfetched 2609363 > > STAT evictions 2761292 > > STAT reclaimed 20778774 > > STAT crawler_reclaimed 0 > > STAT lrutail_reflocked 0 > > > > Stats Slabs > > === > > STAT 1:chunk_size 96 > > STAT 1:chunks_per_page 10922 > > STAT 1:total_pages 2 > > STAT 1:total_chunks 21844 > > STAT 1:used_chunks 14823 > > STAT 1:free_chunks 7021 > > STAT 1:free_chunks_end 0 > > STAT 1:mem_requested 1383893 > > STAT 1:get_hits 40833927 > > STAT 1:cmd_set 17427307 > > STAT 1:delete_hits 3 > > STAT 1:incr_hits 26637054 > > STAT 1:decr_hits 0 > > STAT 1:cas_hits 0 > > STAT 1:cas_badval 0 > > STAT 1:touch_hits 0 > > STAT 2:chunk_size 120 > > STAT 2:chunks_per_page 8738 > > STAT 2:total_pages 11 > > STAT 2:total_chunks 96118 > > STAT 2:used_chunks 96117 > > STAT 2:free_chunks 1 > > STAT 2:free_chunks_end 0 > > STAT 2:mem_requested 10621909 > > STAT 2:get_hits 104399912 > > STAT 2:cmd_set 3074153 > > STAT 2:delete_hits 94 > > STAT 2:incr_hits 0 > > STAT 2:decr_hits 0 > > STAT 2:cas_hits 0 > > STAT 2:cas_badval 0 > > STAT 2:touch_hits 0 > > STAT 3:chunk_size 152 > > STAT 3:chunks_per_page 6898 > > STAT 3:total_pages 40 > > STAT 3:total_chunks 275920 > > STAT 3:used_chunks 275916 > > STAT 3:free_chunks 4 > > STAT 3:free_chunks_end 0 > > STAT 3:mem_requested 39608720 > > STAT 3:get_hits 43871158 > > STAT 3:cmd_set 24375338 > > STAT 3:delete_hits 37175 > > STAT 3:incr_hits 0 > > STAT 3:decr_hits 0 > > STAT 3:cas_hits 0 > > STAT 3:cas_badval 0 > > STAT 3:touch_hits 0 > > STAT 4:chunk_size 192 > > STAT 4:chunks_per_page 5461 > > STAT 4:total_pages 5 > > STAT 4:total_chunks 27305 > > STAT 4:used_chunks 27177 > > STAT 4:free_chunks 128 > > STAT 4:free_chunks_end 0 > > STAT 4:mem_requested 4504231 > > STAT 4:get_hits 77131349 > > STAT 4:cmd_set 4175673 > > STAT 4:delete_hits 678 > > STAT 4:incr_hits 0 > > STAT 4:decr_hits 0 > > STAT 4:cas_hits 0 > > STAT 4:cas_badval 0 > > STAT 4:touch_hits 0 > > STAT 5:chunk_size 240 > > STAT 5:chunks_per_page 4369 > > STAT 5:total_pages 6 > > STAT 5:total_chunks 26214 > > STAT 5:used_chunks 26053 > > STAT 5:free_chunks 161 > > STAT 5:free_chunks_end 0 > > STAT 5:mem_requested 5636482 > > STAT 5:get_hits 86480913 > > STAT 5:cmd_set 3359559 > > STAT 5:delete_hits 267 > > STAT 5:incr_hits 0 > > STAT 5:decr_hits 0 > > STAT 5:cas_hits 0 > > STAT 5:cas_badval 0 > > STAT 5:touch_hits 0 > > STAT 6:chunk_size 304 > > STAT 6:chunks_per_page 3449 > > STAT 6:total_pages 6 > > STAT 6:total_chunks 20694 > > STAT 6:used_chunks 20485 > > STAT 6:free_chunks 209 > > STAT 6:free_chunks_end 0 > > STAT 6:mem_requested 5577183 > > STAT 6:get_hits 14209154 > > STAT 6:cmd_set 1546280 > > STAT 6:delete_hits 1461 > > STAT 6:incr_hits 0 > > STAT 6:decr_hits 0 > > STAT 6:cas_hits 0 > > STAT 6:cas_badval 0 > > STAT 6:touch_hits 0 > > STAT 7:chunk_size 384 > > STAT 7:chunks_per_page
Re: eviction problem :: -f value
> STAT 5:total_pages 6 Each page is (1024 * 1024), so 6291456 > STAT 5:mem_requested 5636482 gives a ~89.5% fill rate. 10% overhead for a slab class is the average and competely normal. You're trying to tune -f to reduce that overhead, but it's not likely to help very much. Try the latest version. 1) it will actively remove expired items from memory, instead of waiting for them to be fetched or fall out the bottom. 2) it will balance memory between slab classes when they get too far apart in age. 3) the segmented LRU might improve your hit ratio even with the same number of evictions, by protecting active items. 4+) other improvements as well. All by default since 1.5.0. 1.5.4 is the latest as of this writing. -Dormando On Tue, 16 Jan 2018, farzan dalaee wrote: > Thanks dormando for the quick response, how can I check for the overhead of > slabs, I > get confused a little. > > On Tue, Jan 16, 2018 at 11:30 AM, dormando wrote: > -f is very hard to tune. you need to actually look at what the overhead > is > on each slab class. > > If you want to reduce evictions the first thing you should try is the > latest version. There're a lot of changes to improve memory efficiency, > which may just fix your problem without you having to do anything else. > > On Mon, 15 Jan 2018, farzan.dal...@bamilo.com wrote: > > > Hi Guys > > we use Memcached 1.4.21 and we got a lot of evictions I try to change > -f > to 1.1 for preventing evictions, is it okay to change -f value or > should I > try > > another method. > > > > > > here our stats , stats slabs, and stats items detail with default -f > 1.25 > value: > > > > Stats > > === > > STAT uptime 4860763 > > STAT time 1516088646 > > STAT version 1.4.21 > > STAT libevent 2.0.21-stable > > STAT pointer_size 64 > > STAT rusage_user 50141.684000 > > STAT rusage_system 109435.872000 > > STAT curr_connections 211 > > STAT total_connections 56669879 > > STAT connection_structures 433 > > STAT reserved_fds 20 > > STAT cmd_get 19743709498 > > STAT cmd_set 107396338 > > STAT cmd_flush 0 > > STAT cmd_touch 0 > > STAT get_hits 17430338962 > > STAT get_misses 2313370536 > > STAT delete_misses 4312232 > > STAT delete_hits 329854 > > STAT incr_misses 39752 > > STAT incr_hits 26636222 > > STAT decr_misses 0 > > STAT decr_hits 0 > > STAT cas_misses 0 > > STAT cas_hits 0 > > STAT cas_badval 0 > > STAT touch_hits 0 > > STAT touch_misses 0 > > STAT auth_cmds 0 > > STAT auth_errors 0 > > STAT bytes_read 1457584516608 > > STAT bytes_written 17191545528667 > > STAT limit_maxbytes 27936161792 > > STAT accepting_conns 1 > > STAT listen_disabled_num 0 > > STAT threads 4 > > STAT conn_yields 0 > > STAT hash_power_level 21 > > STAT hash_bytes 16777216 > > STAT hash_is_expanding 0 > > STAT malloc_fails 0 > > STAT bytes 19633850636 > > STAT curr_items 2056999 > > STAT total_items 107479673 > > STAT expired_unfetched 20124151 > > STAT evicted_unfetched 2609363 > > STAT evictions 2761292 > > STAT reclaimed 20778774 > > STAT crawler_reclaimed 0 > > STAT lrutail_reflocked 0 > > > > Stats Slabs > > === > > STAT 1:chunk_size 96 > > STAT 1:chunks_per_page 10922 > > STAT 1:total_pages 2 > > STAT 1:total_chunks 21844 > > STAT 1:used_chunks 14823 > > STAT 1:free_chunks 7021 > > STAT 1:free_chunks_end 0 > > STAT 1:mem_requested 1383893 > > STAT 1:get_hits 40833927 > > STAT 1:cmd_set 17427307 > > STAT 1:delete_hits 3 > > STAT 1:incr_hits 26637054 > > STAT 1:decr_hits 0 > > STAT 1:cas_hits 0 > > STAT 1:cas_badval 0 > > STAT 1:touch_hits 0 > > STAT 2:chunk_size 120 > > STAT 2:chunks_per_page 8738 > > STAT 2:total_pages 11 > > STAT 2:total_chunks 96118 > > STAT 2:used_chunks 96117 > > STAT 2:free_chunks 1 > > STAT 2:free_chunks_end 0 > > STAT 2:mem_requested 10621909 > > STAT 2:get_hits 104399912 > > STAT 2:cmd_set 3074153 > > STAT 2:delete_hits 94 > > STAT 2:incr_hits 0 > > STAT 2:decr_hits 0 > > STAT 2:cas_hits 0 > > STAT 2:cas_badval 0 > > STAT 2:touch_hits 0 > > STAT 3:chunk_size 152 > > STAT 3:chunks_per_page 6898 > > STAT 3:total_pages 40 > > STAT 3:total_chunks 275920 > > STAT 3:used_chunks 275916 > > STAT 3:free_chunks 4 > > STAT 3:free_chunks_end 0 > > STAT 3:mem_requested 39608720 > > STAT 3:get_hits 43871158 > > STAT 3:cmd_set 243753
Re: eviction problem :: -f value
Thanks again, really appreciated. -- --- You received this message because you are subscribed to the Google Groups "memcached" group. To unsubscribe from this group and stop receiving emails from it, send an email to memcached+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.