【发布时间】:2009-10-12 03:43:18
【问题描述】:
我一直在尝试清除我的内存缓存,因为我注意到在使用 ps -aux 时存储占用了几乎 30% 的服务器内存。
所以我运行了以下 php 代码。
$memcache = 新的内存缓存; $memcache->connect("localhost",11211); $memcache->flush(); print_r($memcache->getStats());这导致
的输出(
[pid] => 4936
[uptime] => 27318915
[time] => 1255318611
[version] => 1.2.2
[pointer_size] => 64
[rusage_user] => 9.659531
[rusage_system] => 49.770433
[curr_items] => 57864
[total_items] => 128246
[bytes] => 1931734247
[curr_connections] => 1
[total_connections] => 128488
[connection_structures] => 17
[cmd_get] => 170288
[cmd_set] => 128246
[get_hits] => 45464
[get_misses] => 124824
[evictions] => 1009
[bytes_read] => 5607431213
[bytes_written] => 1806543589
[limit_maxbytes] => 2147483648
[threads] => 1
)
这应该是相当基本的,但很明显,我遗漏了一些东西。
【问题讨论】: