first time user with out of memory question

timeless time at digg.com
Tue Jun 13 01:38:38 UTC 2006


>> rusage_user:5221530
>> rusage_system:23429010
>
> Those're CPU seconds of usage (per core in the box). Divide them by 
> the uptime to get the average % of CPU used since it was started. 
> Remember that this number will be very different from what you will 
> actually be seeing during peak/low hours.

Thanks for the hint. I followed your suggestion to check it out, and I 
think you were close, but I think it's actualy CPU millis. Here are two 
samples ~60 seconds apart:

#1
rusage_user:5226591
rusage_system:23446455
#2
rusage_user:5226680
rusage_system:23446769

delta(total) ~ 400

Here are two "ps" output on the same interval:

#1
:) ps -eo cmd,cputime | grep memcached | grep -v grep
/usr/bin/memcached -v -m 20.... 07:57:53
#2
:) ps -eo cmd,cputime | grep memcached | grep -v grep
/usr/bin/memcached -v -m 20.... 07:57:53

(Claims "man ps": cputime    TIME     cumulative CPU time, 
"[dd-]hh:mm:ss" format.)

Here's a ~20-minute interval:

#1
rusage_user:5226680
rusage_system:23446769
#2 - 20 minutes later
rusage_user:5228117
rusage_system:23451575

delta(user) = 1437
delta(system) = 4806
delta(total) = 6243

#1
:) ps -eo cmd,cputime | grep memcached | grep -v grep
/usr/bin/memcached -v -m 20.... 07:57:53
#2 - 20 minutes later
:) ps -eo cmd,cputime | grep memcached | grep -v grep
/usr/bin/memcached -v -m 20.... 07:57:59

delta(cputime) = 6

6 * 1000 ~ 6243.

--
timeless



More information about the memcached mailing list