There are a couple ways to increase concurrency in moxi:
By default, moxi uses 4 worker threads. This can be changed via the -t THREAD_NUM flag. For example:
./moxi -t 6 -Z port_listen=11311 http://membase1:8091/pools/default/bucketsStreaming/shoppingCartsmoxi limits the number of inflight or concurrent client requests that it will send to the memcached/membase cluster. This is controlled via the -Z concurrency configuration value, whose default value is 1024. For older users of moxi, the "concurrency" configuration parameter is also known as the "downstream_max" configuration parameter. For example, to set concurrency to 8:
./moxi -Z port_listen=11311,concurrency=8 http://membase1:8091/pools/default/bucketsStreaming/shoppingCartsThe formula of total number concurrent requests that moxi will process is:
NUM_THREADS x NUM_BUCKETS x concurrency
With the last command-line, then, the NUM_THREADS defaults to 4. There's only one bucket involved (the shoppingCarts bucket), so NUM_BUCKETS is 1. And, concurrency has been overridden to be 8. So, there will be moxi allow only 32 concurrent client requests to be processed. All other client requests will go onto a wait queue until active requests are finished.
Increasing concurrency and the number of worker threads isn't necessarily a free lunch. More threads, for example, means using resources that other processes (such as your web app servers) might need. Higher concurrency settings from moxi (when multiplied by the number moxi's you've deployed) means more connections will be created to downstream servers, which can eventually cause other performance issues or hit connection (file descriptor) limits.
More information on the downstream conn queues is available: Chapter 2, Following A Request Through Moxi.