Memcached最小平板72字节用于简单键'k1'和值'3',为什么?

时间:2013-09-07 15:44:54

标签: key memcached

我有很多10个字节的键和int值。使用默认设置的Memcached对一条记录使用90个字节。我觉得太多了。我做了这个测试。

# cat /etc/sysconfig/memcached
PORT="11211"
USER="memcached"
MAXCONN="4096"
CACHESIZE="256"
OPTIONS="-l 127.0.0.1 -n 1 -f 1.1"

# service memcached restart

# telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
set k1 0 360 1
3
STORED
quit
Connection closed by foreign host.

# memcached-tool 127.0.0.1 display

  #  Item_Size  Max_age   Pages   Count   Full?  Evicted Evict_Time OOM
  3      72B         4s       1       1     yes        0        0    0

# memcached -vv -unobody -n 1 -f 1.1
slab class   1: chunk size        56 perslab   18724
slab class   2: chunk size        64 perslab   16384
slab class   3: chunk size        72 perslab   14563
slab class   4: chunk size        80 perslab   13107
slab class   5: chunk size        88 perslab   11915
slab class   6: chunk size        96 perslab   10922
slab class   7: chunk size       112 perslab    9362
slab class   8: chunk size       128 perslab    8192

为什么商品尺寸为72B?为什么这么贪心?

0 个答案:

没有答案