> It is a fact that issuing a smaller multiget against a particular server will take *less* CPU time than a larger one. Adding servers does reduce CPU time on the server.
I suppose this is where you disagree with Jeff Rothschild. I'd like to point out that even if CPU usage is less, each request still counts, so a brand new server immediately takes a fair amount of keys to serve and immediately an avalanche of requests starts coming in. Clients used to send requests to X servers to get Y keys, now they need to send X + 1. So adding a new host did not reduce number of requests and thus CPU but rather multiplied it. So if you sum up all CPU used across the cluster - it went UP
To make things worse - if one blindly continue down this path - one starts running out of connections of memcached servers.
> Hence, adding servers to a cluster *will* reduce the CPU usage on the cluster.
I'm not sure if I can agree here. You bought a new box, you put it there, you immediately see it running at, say, 40% CPU. You don't see any significant CPU drop on all the old hosts. Is it not a clear indication of more CPU consumed across the board?
It's completely impossible to add a new host and not have the old host drop in CPU usage *at all*. Even if it's immeasurably small, making a multiget smaller on a host *will* reduce its CPU usage. The overhead for the request itself is high enough that spreading out the load becomes less effective, similar to adding slaves in a MySQL cluster as the write load increases.
The solution is the same, but it's a falsehood to believe that lookups within a multiget are completely "free" CPU-wise.
Comments 7
Great info.
Reply
Reply
I suppose this is where you disagree with Jeff Rothschild.
I'd like to point out that even if CPU usage is less, each request still counts, so a brand new server immediately takes a fair amount of keys to serve and immediately an avalanche of requests starts coming in. Clients used to send requests to X servers to get Y keys, now they need to send X + 1.
So adding a new host did not reduce number of requests and thus CPU but rather multiplied it.
So if you sum up all CPU used across the cluster - it went UP
To make things worse - if one blindly continue down this path - one starts running out of connections of memcached servers.
I do agree with everything else you said.
Reply
If you read carefully, you'll notice that most of the post is just addressing the moronic twitter soundbites that were extracted from the talk.
Reply
I'm not sure if I can agree here. You bought a new box, you put it there, you immediately see it running at, say, 40% CPU.
You don't see any significant CPU drop on all the old hosts.
Is it not a clear indication of more CPU consumed across the board?
Reply
The solution is the same, but it's a falsehood to believe that lookups within a multiget are completely "free" CPU-wise.
Reply
Leave a comment