Here is a dump of the 'stats', apologies for the lack of brevity:
$VAR2 = {
'hosts' => {
'127.0.0.1:11211' => {
'misc' => {
'bytes' =>
'2484753',
'curr_connections'
=> '4',
'connection_structures' => '19',
'pointer_size' =>
'64',
'time' =>
'1240231654',
'total_items' =>
'73800',
'cmd_set' =>
'73800',
'bytes_written' =>
'51055551238',
'evictions' => '0',
'curr_items' =>
'1139',
'pid' => '5959',
'limit_maxbytes' =>
'1610612736',
'uptime' =>
'738223',
'rusage_user' =>
'17.002415',
'cmd_get' =>
'1439390',
'rusage_system' =>
'122.856323',
'version' =>
'1.2.6',
'get_hits' =>
'1320363',
'bytes_read' =>
'351387662',
'threads' => '1',
'total_connections'
=> '51051',
'get_misses' =>
'119027'
},
'sizes' => {
'384' => '4',
'5056' => '1',
'2784' => '1',
'2848' => '3',
'1888' => '1',
'16960' => '1',
'64544' => '1',
'2752' => '1',
'8544' => '1',
'8320' => '1',
'5408' => '1',
'1312' => '1',
'9248' => '1',
'3584' => '1',
'1952' => '2',
'11296' => '1',
'131616' => '1',
'4096' => '1',
'672' => '1',
'8736' => '2',
'1184' => '1',
'3392' => '2',
'51616' => '1',
'7712' => '1',
'4800' => '3',
'42432' => '1',
'25824' => '1',
'20640' => '1',
'4576' => '1',
'4416' => '1',
'34624' => '1',
'8384' => '1',
'33568' => '1',
'7840' => '2',
'8992' => '1',
'12448' => '1',
'6112' => '1',
'6560' => '1',
'130624' => '1',
'29824' => '1',
'4064' => '1',
'992' => '1',
'6432' => '2',
'1664' => '1',
'7968' => '1',
'15776' => '1',
'1152' => '1',
'41760' => '1',
'224' => '15',
'256352' => '1',
'1984' => '4',
'2976' => '1',
'9184' => '2',
'12864' => '1',
'7264' => '1',
'1216' => '2',
'3264' => '1',
'5344' => '1',
'21856' => '1',
'6016' => '1',
'352' => '2',
'96' => '5',
'704' => '231',
'160' => '35',
'143840' => '1',
'19616' => '1',
'3488' => '1',
'17152' => '1',
'3520' => '2',
'256' => '5',
'9504' => '1',
'1760' => '1',
'7584' => '1',
'28928' => '1',
'43008' => '1',
'288' => '5',
'8160' => '1',
'4032' => '1',
'9920' => '1',
'3744' => '1',
'10528' => '1',
'25888' => '1',
'10240' => '1',
'45024' => '1',
'4448' => '1',
'1856' => '1',
'1536' => '2',
'3872' => '2',
'24064' => '1',
'8800' => '1',
'1056' => '1',
'3136' => '1',
'9088' => '1',
'17728' => '1',
'52928' => '1',
'4832' => '1',
'46144' => '1',
'3200' => '1',
'2464' => '1',
'5536' => '2',
'24576' => '3',
'768' => '2',
'3424' => '1',
'416' => '3',
'4352' => '1',
'1696' => '1',
'576' => '1',
'1504' => '1',
'128' => '672',
'640' => '1',
'192' => '8',
'800' => '3',
'9856' => '3',
'5600' => '1',
'15392' => '1',
'19744' => '1',
'5824' => '3',
'7040' => '2',
'16352' => '1',
'4320' => '1',
'6144' => '1',
'13024' => '1',
'3072' => '1',
'3968' => '1',
'3360' => '2',
'20896' => '1',
'91744' => '1',
'25504' => '1',
'2368' => '1',
'11136' => '1',
'28064' => '1',
'608' => '2',
'736' => '2',
'3648' => '1'
},
'malloc' => {
'total_free' =>
'112672',
'releasable_space' => '110064',
'free_chunks' =>
'11',
'fastbin_blocks'
=> '0',
'arena_size' =>
'450560',
'total_alloc' =>
'337888',
'max_total_alloc'
=> '0',
'mmapped_regions'
=> '50',
'mmapped_space'
=> '35717120',
'fastbin_space'
=> '0'
}
}
},
'total' => {
'malloc_releasable_space' => 110064,
'bytes' => 2484753,
'connection_structures' => 19,
'total_items' => 73800,
'malloc_mmapped_regions' => 50,
'malloc_free_chunks' => 11,
'malloc_total_alloc' => 337888,
'cmd_set' => 73800,
'bytes_written' => '51055551238',
'malloc_fastbin_blocks' => 0,
'curr_items' => 1139,
'malloc_max_total_alloc' => 0,
'malloc_arena_size' => 450560,
'malloc_mmapped_space' => 35717120,
'cmd_get' => 1439390,
'malloc_fastbin_space' => 0,
'get_hits' => 1320363,
'bytes_read' => 351387662,
'total_connections' => 51051,
'malloc_total_free' => 112672,
'get_misses' => 119027
}
};
memcached started with 1.5G
2009/4/20 Henrik Schröder <[email protected]>
> What does the "stats" command output when you get misses before you think
> you should?
>
>
> /Henrik
>
>
> On Mon, Apr 20, 2009 at 13:07, tcbarrett <[email protected]> wrote:
>
>>
>> Hi
>>
>> I searched the group for 'measuring memory usage' with no hits.
>>
>> I am trying to determine how much memory my cached data is using. I
>> have some large data blocks that are not caching properly[1]. I am
>> assuming that is due to there being a smaller numer of large 'buckets'
>> and I have used all mine up?
>>
>> I am in the process of breaking it down into more sensible chunks
>> (e.g. one data hash has 1000s of subkeys that I can make into cache
>> hits on their own). However I would ideally like to know how much
>> memory I am using as I have absolutely no idea if I am near the
>> saturation point of allocated memory or not.
>>
>> I feel a bit dumb as this seems to be either a) common problem and I
>> am incapable of finding the answer myself or b) a stupid problem that
>> nobody ever thought someone would get into.
>>
>> This is running on a linux box (a few flavours), using perl.
>>
>> [1] By this I mean that sometimes, after a period of time, the cache
>> retrieval is empty (before expiry). Basically I don't know why. Could
>> it be some other application eating the memory? Or is it other large
>> keys being set, pushing it out? Or am I using up all the allocated
>> memory?
>>
>
>
