Dormando, What exactly do you mean by stack? Do you mean buffering?
I've tried a few options from libmemcached: buffering and no_reply. Both of them seem to make things much much faster. With buffering it does 150k/s with no_reply ~750k/s. So it seems memcached itself is lightning fast it's just the TCP roundtrip slowing it down. On Dec 13, 6:10 pm, dormando <[email protected]> wrote: > > I'm running: Linux AS292 2.6.38-13-generic #52-Ubuntu SMP Tue Nov 8 > > 16:53:51 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux Ubuntu 11.04 > > > My CPU is Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz with 2 cores. > > Pretty high end laptop. > > > I've compiled and installed memcached 1.4.10. I've also compiled and > > installed libmemcached-1.0.2. I've started memchached without any > > additional options. > > > I'm running a simple c++ program to benchmark memcached sets per > > second. I can only get ~22k sets per second which I think is quite > > low? I would be expecting at least 50k and even 300k with latest > > memcached optimizations? > > > However maybe I'm completely off with my expectations. Here's the > > program that I'm running. Is there anything that I'm doing wrong? > > > Thanks! > > Run two or three more of your applications, or adjust it to run many > connections in parallel, or to use binary protocol and stack SET's. > > memcached will go much faster, but a single process with a single > connection will be limited by the roundtrip latency. > > Using mc-crusher and multigets or multisets over localhost I can hit > millions:https://github.com/dormando/mc-crusher- but it's not a full > featured client. If I wanted a real client to go that fast, I would have > to run many more of them as they'd use a bit more CPU.
