forked from zyounker/brutis
-
Notifications
You must be signed in to change notification settings - Fork 0
Memcache benchmarking tool written in PHP
License
georgiana-gligor/brutis
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Introduction: Brutis is a tool designed to exercise memcache instances providing reproducible performance data for comparison purposes. Brutis can be useful for sizing of memcache clusters as well as testing changes to the system, the hardware, and/or the environment. Much like a dynamometer, the numbers Brutis produces are not as important as the differences in the numbers between changes to the system, the hardware, and/or the environment. When sizing memcached clusters, Brutis can help by stressing a memcached cluster to see: * How many ops the cluster is capable of * How much load the network config can take * How many connections a memcache cluster is capable of handling (we’ve tested up to 40K connections) With respect to instance (not cluster) sizing, Brutis can be used to simulate varying object and key sizes to see how many keys/objects can fit in a memcache instance before evictions start. Brutis is made up of three components; The main executable, the client, and the collector. The main executable serves as a wrapper for the client and collector. It handles forking and process control. The client is the actual memcache client program. The collector aggregates the stats from one or many client processes and outputs results to the screen or to a file. For greater control, you can run the collector and the client as standalone programs. Required Libraries: * pecl/memcache >= 2.2.4 - http://pecl.php.net/package/memcache Overview: * Generate pseudo random data and md5 checksum * Do memcache set operation with object that encapsulates data and md5 checksum * Do memcache get operation from memcache servers * Verify data and md5 checksum match * report results to collector Known Issues: * Batch gets can cause misses if rand() picks the same key multiple times * Total stats may not work on 32Bit arch. Looking into big int to work around php's lack of uint64_t Files: ./license License info ./readme This file ./brutis Main executable. ./lib/client Memcache client ./lib/collector Statistic collector ./lib/functions.php Common functions ./lib/taskmanager.php Taskmanager class Usage: brutis [OPTIONS] -x [server,..] Options: Options may be given in any order. -k {Max Keys} Maximum key id to iterate up to. Keys are a concatenation of $prefix and $key_id. Default is '1000000'. -z {Key offset} Where key_id starts to iterate. Default is '0'. -a {Set Pattern:Get Pattern} Valid patterns are S for sequential and R for Random. Default is 'S:R'. -p {Key Prefix} Data to use for key prefix. Keys are a concatenation of $prefix and $key_id. Default is 'brutis-'. -P Enable persistent connections -R {time} Non-persistent disconnect/reconnect interval -i {Poll interval} Interval in seconds to send data to collector and write out to output file. -b {Batch} Number of key's to batch into 1 get operation. -c {Collector:Port} Host to connect or start collector on. Default is localhost's DNS name '<hostname>:9091'. -D Disable starting of local collector. (for remote reporting) -d Enable MD5 checksum. -r {Set Ratio:Get Ratio} Ratio of sets to gets. Default '1:10'. -n {Operations} Number of operations to perform before exiting. -m {Multiplier} Number of connection pools to create -t {Time} Time to run operations in seconds before exiting. Default '172800'. -f {Forks} Number of clients to fork. Default '1'. -F {Format} Format of output file. CSV or JSON supported. Default CSV. -s {Size} Size of object to generate for sets in bytes. Default 256. -x {Server:tcp_port:udp_port,...} List of memcache servers to use. UDP port should be 0 unless trying to enable UDP support. UDP support is only available with danga memcache library 3.x -o {Output Filename} Filename to output raw stats to. Causes collector to be invoked. -v Enable Verbose output. Causes the collector to be invoked. -h Display help. Exit Codes: Exit Code 0: Success Exit Code 1: Error Exit Code 4: Warning - Either Set failures or md5 checksum mismatch Release Notes: Version - 0.93 * Fixed bug with not reporting when verbose not specified * Added dataset size to summary * Fixed sequential set/get bug causing misses * Fixed multiplier bug in sets exiting after 1st failure Version - 0.92 * Fixed bug with taskmanager library hitting maxruntime and killing collector * Fixed bug with collector starting when -v & -o not specified in client * Fixed disconnect errors in collector * Issue 8: Fixed onShutdown() not being called in collector * Added JSON output format (experimental) Version - 0.91 * Changed connection count on collector to client connection count * Renamed collector3 to collector, removed old collectors * Issue 7: Fixed latency bug * Collector 3 introduced * Removed dependency on Net_Server & Net_Socket * Aggregate stats per client hostname * Added connection Multiplier (Experimental) * Switch from Connect to addServer to use connection pooling * Added Persistent commandline option * Added Reconnect timer for non-persistent connection tests Version - 0.90 * Added collector2 and made default * Changed checksum to default to disabled * Added new exit summary in collector2 * Fixed ratio rounding bug in set_intervals() * Added latency * Fixed rounding bug in operations displayed by collector. * Changed random data to use chr(1-255). * Fixed bug in valid hosts not allowing IP addresses. Version - 0.89 * Rename to Brutis * Do not allow batch gets greater then max keys. Version - 0.88 * Added experimental support for danga version 3.x library and UDP. Version - 0.86 * Fixed bug with multiple of the same argument * added sigint handler to collector so it cleans up before exit on ctrl-c * Fixed total operations accounting in collector to be correct * Defined Exit codes * Fixed incorrect exitcode of 1024 from client * Removed collector limitation of running on all ip/ports Version - 0.85 * Added host validation * Many cleanups Version - 0.83 * Fixed MD5 not being added to transferred total * recognize localhost as well as hostname to know when to start collector * Removed offset from set_interval * Cleaned up taskmanager formating Version - 0.82 * Added batch gets * Added Polling interval * Changed Gets to hits and added ops to collector for batch gets accounting * Removed 33 byte limitation with warning and disable of checksum * Added Readme file Version - 0.81 * Exit code 4 on only set failure or md5 checksum mismatch Version - 0.80 * Exit code 4 on set failure, md5 checksum mismatch, and misses * Introduced Access Patterns for set and get operations * Fixed bug to correctly display MB/Sec transferred with mixed object sizes Version - pre 0.80 * Undocumented Examples Usage: Single client node, 20 forks, random Set test, single collector cn-1: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 1:0 -v Single client node, 20 forks, random Get test, single collector cn-1: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 0:1 -v Single client node, 20 fork, random 1:10 get:set ratio, single collector cn-1: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 1:10 -v Multi client node, 20 forks, random Set test, single collector cn-1: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 1:0 -v -c cn-1 cn-2: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 1:0 -v -c cn-1 cn-3: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 1:0 -v -c cn-1 cn-4: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 1:0 -v -c cn-1 Multi client node, 20 forks, random Get test, 1 collecter per client node. cn-1: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 0:1 -v cn-2: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 0:1 -v cn-3: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 0:1 -v cn-4: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 0:1 -v Multi client node, 20 forks, random 1:10 set:get ratio, single collector cn-1: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 1:10 -v -c cn-1 cn-2: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 1:10 -v -c cn-1 cn-3: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 1:10 -v -c cn-1 cn-4: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:r -r 1:10 -v -c cn-1 Multi client node, 20 forks, mixed load/size test, single collector cn-1: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:s -r 1:100 -v -s 250 -c cn-1 cn-2: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a s:r -r 1:10 -v -s 512 -c cn-1 cn-3: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a s:r -r 1:50 -v -s 128 -c cn-1 cn-4: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -a r:s -r 1:1 -v -s 64 -c cn-1 Multi client node, 20 forks, High connection count, single collector cn-1: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -m 20 -a r:r -r 1:10 -v -c cn-1 cn-2: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -m 20 -a r:r -r 1:10 -v -c cn-1 cn-3: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -m 20 -a r:r -r 1:10 -v -c cn-1 cn-4: ./brutis -f 20 -x mc-1,mc-2,mc-3,mc-4 -m 20 -a r:r -r 1:10 -v -c cn-1
About
Memcache benchmarking tool written in PHP
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published