Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 1.8.x

Performance issues with lot of connections

No replies
  • Login or register to post comments
Thu, 05/17/2012 - 14:56
eduardo.oliveira
Offline
Joined: 05/17/2012
Groups: None

<?php
$cb = new Couchbase("IP:8091", "cbroot", "XXXXXXX", "default");
echo time() . "
";
for ($i = 1 ; $i <= 2000 ; ++$i)
$cb->get("testXX");
echo time();
?>

when i call it from the browser 1-2seconds it do the job, is good.

but with this

<?php
$cb = new Couchbase("IP:8091", "cbroot", "XXXXXXX", "default");
$cb->get("testXX");
?>

and i test it with ab (apache benchmark) ab -n 2000 -c 20 http://..../

i get 20-25 seconds, i can put concurrency higher doesn't do a lot of difference, the bottleneck is not the nginx is running in one server just for itself and don't pass 10% CPU, but the server with couchbase just to itself it goes to 80-90% CPU. The only thing i can think is that the open and drop connections is very resource demanding.

I googled it and the only thing i found was this:

"Couchbase generally recommends that you create a connection pool from your application to the cluster and just re-use those connections versus creation and destroying them over and over. On heavier load applications, the creation and destruction of these connections over and over can get very expensive from a resource perspective."
@ http://stackoverflow.com/questions/10333539/couchbase-1-8-0-concurrency-...

I want to do some HTTP API in the middle to make a abstraction and to be used for a lot of different applications but i need 1k/s operations per second, that i benchmark and i know couchbase can handle that values, but i didn't expect this problem with the connections, is any support for persistence connections to couchbase with PHP?

Thank you a lot in advance

Top
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker