Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I tested on AWS ubuntu 10.04 memcached 1.4.2

When testing with memslap (different concurrent users numbers and different instance types (8G and 1.7G memory)

Top shows 110% cpu on the memcached process and 55% cpu idle in the cpus summary.

What is wrong here?

Is the server using just one core for memcached? If so is it possible to change it to get more out of the box?

share|improve this question
    
memcached isn't particularly CPU intensive, you should pay more attention to memory usage/swaps/memory IO –  sam Nov 22 '11 at 14:36
    
I know, this is why I'm worried. There is no memory shortage. there are a few gigs of ram free on the server. how can I check the reason? –  Niro Nov 22 '11 at 14:40
    
What's the -m flag set to when you start Memcached (Amount of memory Memcached can use). It's possible if that's a low value, when the cache gets full the CPU is being used for deciding which items to remove. –  sam Nov 22 '11 at 14:46
    
its 1400 for the test (1.4G). the memory isnt exhausted and there are no purges. –  Niro Nov 22 '11 at 14:56
    
Post the output from mpstat -P ALL, this will show how much CPU is being used per processor and what the type of CPU usage is (iowait/steal etc.). Also you should probably accept some answers to previous questions you've asked, you only have 51% accept which will put some users off answering –  sam Nov 22 '11 at 15:06
add comment

1 Answer

One thought I have. In my experience with AWS instances using top may or may not return realistic values for CPU usage (usually not). Check cloudwatch and see if it is showing a high CPU usage. This especially applies to micro instances, on those top is absolutely useless.

share|improve this answer
    
doesnt seem to be the reason. large instance + I watched top on similar servers for a long time didnt notice similar issue –  Niro Nov 23 '11 at 14:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.