Max connections allowed
Hi All:
I set up my own client program and simulate 128 connections to connect to Membase and I am very sure total 128 connections have been established and connected, however from ifstat and membase connections count, only 27 connections. any1 knows what is the maximum connections membase support?
Thanks a lot!!
yes, i have connected to 11211, not 11210. does not matter how much connections I set up, server only shows 27 connections.
+ echo stats
+ nc localhost 11211
STAT delete_misses 0
STAT ep_io_num_write 737244
STAT rejected_conns 0
STAT connection_structures 27
STAT limit_maxbytes 67108864
STAT decr_hits 0
STAT ep_bg_load_avg 52
STAT ep_pending_ops_max_duration 0
STAT ep_flush_duration_total 116
STAT ep_item_flush_expired 0
STAT ep_num_not_my_vbuckets 0
STAT ep_bg_wait_avg 3134
STAT ep_too_young 0
STAT curr_connections 27
STAT rusage_system 183.043173
STAT ep_io_write_bytes 1143518031
STAT ep_total_cache_size 15196608689
STAT ep_storage_age 0
STAT ep_flush_duration_highwat 18
STAT ep_flush_duration 1
STAT cas_misses 0
STAT ep_flusher_todo 0
STAT ep_pending_ops 0
STAT mem_used 7163892109
STAT ep_dbshards 4
STAT ep_warmup_oom 0
STAT ep_vbucket_del 0
STAT get_misses 0
STAT ep_num_value_ejects 5501239
STAT ep_queue_size 334
STAT ep_total_del_items 0
STAT bytes_read 2853042870
STAT get_hits 13993872
STAT decr_misses 0
STAT ep_bg_min_wait 10
STAT ep_commit_num 195
STAT rusage_user 156.877151
STAT bucket_conns 17
STAT ep_num_non_resident 5475218
STAT ep_tap_keepalive 0
STAT ep_oom_errors 0
STAT ep_too_old 0
STAT cmd_flush 0
STAT ep_bg_max_load 4955
STAT ep_max_txn_size 250000
STAT ep_version 1.6.0_10_g3b4878a
STAT uptime 606
STAT ep_data_age_highwat 31
STAT ep_queue_age_cap 900
STAT incr_hits 0
STAT time 1287475878
STAT ep_warmup_dups 0
STAT ep_total_persisted 736220
STAT daemon_connections 10
STAT ep_flusher_state running
STAT pointer_size 64
STAT version 1.4.4_298_g250909b
STAT ep_max_data_size 10485760000
STAT ep_tmp_oom_errors 0
STAT ep_commit_time_total 65
STAT ep_warmup_time 50
STAT ep_item_commit_failed 0
STAT total_connections 27
STAT curr_items 9156982
STAT ep_total_new_items 736220
STAT ep_data_age 2
STAT delete_hits 0
STAT ep_bg_max_wait 2880965
STAT ep_storage_type featured
STAT curr_items_tot 9156982
STAT ep_total_enqueued 736554
STAT ep_mem_low_wat 6291456000
STAT ep_kv_size 7138062345
STAT ep_vbucket_del_fail 0
STAT ep_min_data_age 0
STAT ep_io_num_read 8446450
STAT ep_warmed_up 8420429
STAT ep_item_flush_failed 0
STAT cas_hits 0
STAT ep_warmup true
STAT ep_dbname /opt/membase/1.6.0.1/data/ns_1/default
STAT ep_num_expiry_pager_runs 0
STAT ep_commit_time 0
STAT auth_errors 0
STAT ep_bg_fetched 26021
STAT ep_storage_age_highwat 29
STAT threads 4
STAT pid 25894
STAT auth_cmds 16
STAT cas_badval 0
STAT cmd_set 736554
STAT ep_io_read_bytes 13275098723
STAT cmd_get 13993872
STAT ep_expired 0
STAT conn_yields 0
STAT ep_warmup_thread complete
STAT ep_flush_preempts 24
STAT ep_num_eject_failures 940438
STAT bytes_written 21754108600
STAT libevent 1.4.13-stable
STAT ep_bg_num_samples 26021
STAT ep_num_pager_runs 1
STAT ep_mem_high_wat 7864320000
STAT ep_dbinit 0
STAT incr_misses 0
STAT ep_bg_min_load 24
STAT ep_pending_ops_total 0
STAT ep_pending_ops_max 0
STAT ep_overhead 25829764
This is a bit confusing, but when you connect to port 11211 you're talking to moxi that is a vbucket-aware proxy to membase. That means that you can use any memcached client out there, and still make use of the vbucket consept in membase. It means that it will hide the underlying "cluster" from you, so when you run the stats command on moxi you will see the aggregated stat on your entire cluster... There is AFAIK no way to get moxi's internal connection usage.
Cheers,
Trond
thanks trond for quick replying. let me make this simple.
set up membase server,
set up my client(tested with stock version memcached, works very well)
set up 128 connections(from netstat showing all conections established)
but from either membase console or STAT, only shows 27 connections.
As I said, you're connecting through moxi, so _moxi_ will have 128 connections to your application, but it will only use 27 connections to talk to all of the different membase nodes, and _thats_ the connections you will see from the stat command.
If you connect all of your clients to 11210 and then run the stats command you'll see that the number of connections will be higher (please note that port 11210 only speaks the binary protocol)
Cheers,
Trond
Hi Trond, I have only one membase server running, one bucket, one node, the simplest setting.
Yes, but membase still use vbuckets so that when you add your second server you may rebalance the data. That means you're still running moxi, and moxi will still use less connections to the backend.
Did you try to connect to port 11210 and see that the connection number increased?
Cheers,
Trond
Ok. i got u. thanks a lot
Unless you are connecting directly to port 11210 you will connect to moxi, and moxi will squash multiple client connections together when talking to the memcached servers...
Trond