DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Databases
  4. The Couchbase Workload Generator

The Couchbase Workload Generator

Don Pinto user avatar by
Don Pinto
·
Jan. 31, 13 · Interview
Like (0)
Save
Tweet
Share
3.53K Views

Join the DZone community and get the full member experience.

Join For Free

As a developer, if you’ve installed Couchbase Server 2.0 and seen its new features, you might want to hit the server with some load to do some basic testing of your Couchbase cluster. I’ve personally had a number of reasons to need to run a random workload against Couchbase to be able to demonstrate how it works and the different statistics shown in the Couchbase admin UI.


Using cbworkloadgen, a sample workload generator tool for Couchbase, you can try a different operations and monitor the activity of your cluster. cbworkloadgen provides basic testing functionality but is not designed for performance or stress testing. It has options for tuning the ratio of set:get operations, the number and size of the documents inserted and the number of concurrent worker threads.


If you want to quickly test your Couchbase Server installation using cbworkloadgen, you can execute the cbworkloadgen tool supplying the IP address of the running node with the -n option.

Dons-MacBook-Pro:tools don$ pwd

/Applications/Couchbase Server.app/Contents/Resources/couchbase-core/bin/tools

Dons-MacBook-Pro:tools don$ ./cbworkloadgen -n localhost:8091

[####################] 100.0% (10527/10526 msgs)

bucket: default, msgs transferred...

     :                total |       last |    per sec

batch :                   11 |         11 |       18.6

byte  :               105270 |     105270 |   177716.4

msg   :                10527 |      10527 |    17771.6

done

If you want to do a longer test, you can insert more items and control the item size, number of threads and the ratio of sets:gets. In the example below we insert 500K items with a minimum size of 10 and 20% set:get ratio.

Dons-MacBook-Pro:tools don$ ./cbworkloadgen -n localhost:8091 -i 500000 -r .2 -s 10

[####################] 100.0% (2499996/2500000 msgs)

bucket: default, msgs transferred...

     :                total |       last |    per sec

batch :                 2500 |       2500 |       20.3

byte  :             24999960 |   24999960 |   203332.9

msg   :              2499996 |    2499996 |    20333.3

done

Finally, don’t forget to look at how the different metrics change in the Couchbase admin UI as shown below:

A workload in progress shown using the admin UI

 

Summary stats

Stats for data partitions (vBuckets)
 
Disk queue stats 
As you can see, cbworkloadgen is a quick way to generate a load against Couchbase Server without a lot of effort.
Good luck with your Couchbase Applications!


Couchbase Server

Published at DZone with permission of Don Pinto, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • The Real Democratization of AI, and Why It Has to Be Closely Monitored
  • Uplevel Your Managers With Mini-M Support Groups
  • Apache Kafka Introduction, Installation, and Implementation Using .NET Core 6
  • Data Engineering Trends for 2023

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: