Memcache configuration for storing sessions/usr/bin/memcached-m 64-c 2048-f 1.10-l 192.168.2.10-p
11200-n 1024-I 5242880-u apache &-r maximize core file limit-c client connections-f slab minimum chunk (storage unit, actual storage unit) Growth
Factor (slab1 is twice the size of slab2)-minimum size of n chunk-size of I slab, one user 1 k, approximately 5000 online/usr/bin/memcached-m 32-c 2048-f 1.10-l 192.168.2.10-p
11200-n 1024-I 5242880-u apache & aims to be sufficient. When the session is far smaller than 1 K, it will be a waste. In general, 5000 people can be stored in 5 m. [Html] [root @ sc-centos6-1 ~] # Memcached-tool 192.168.2.10: 11200 # Item_Size Max_age Pages Count Full? Evicted Evict_Time OOM 1 1.0 K 205 s 1 1 2 no 0 0 0 [root @ sc-centos6-1 ~] # Telnet 127.0.0.1 11200 Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused [root @ sc-centos6-1 ~] # Telnet 192.168.2.10 11200 Trying 192.168.2.10... Connected to 192.168.2.10. Escape character is '^]'. set aa 33 3600 10 1234567890 STORED set aa 33 3600 100 1234567890123456789012345678901234567890123456789
012345678901234567890123456789012345678901234567890 STORED get aa VALUE aa 33 100 12345678901234567890123456789012345678901234567890
12345678901234567890123456789012345678901234567890 END set aa1 33 3600 10 1234567890 STORED get aa1 VALUE aa1 33 10 1234567890 END stats slabs STAT 1: chunk_size 1072 STAT 1: chunks_per_page 4890 STAT 1: total_pages 1 STAT 1: total_chunks 4890 STAT 1: used_chunks 2 STAT 1: free_chunks 0 STAT 1: Running 4888 STAT 1: mem_requested 250 STAT 1: get_hits 2 STAT 1: Running _set 3 STAT 1: delete_hits 0 STAT 1: incr_hits 0 STAT 1: decr_hits 0 STAT 1: cas_hits 0 STAT 1: cas_badval 0 STAT active_slabs 1 STAT total_malloced 5242080 END