{"id":20564533,"url":"https://github.com/tarantool/nosqlbench","last_synced_at":"2025-04-14T15:12:54.183Z","repository":{"id":1577254,"uuid":"2029671","full_name":"tarantool/nosqlbench","owner":"tarantool","description":"Micro-benchmarking NoSQL storage","archived":false,"fork":false,"pushed_at":"2020-12-23T21:04:48.000Z","size":284,"stargazers_count":16,"open_issues_count":9,"forks_count":6,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-04-14T15:12:53.747Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"syl20bnr/evil-escape","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tarantool.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-07-11T10:35:50.000Z","updated_at":"2025-04-07T11:56:32.000Z","dependencies_parsed_at":"2022-07-31T14:49:08.854Z","dependency_job_id":null,"html_url":"https://github.com/tarantool/nosqlbench","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Fnosqlbench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Fnosqlbench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Fnosqlbench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tarantool%2Fnosqlbench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tarantool","download_url":"https://codeload.github.com/tarantool/nosqlbench/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248904637,"owners_count":21180835,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T04:27:33.010Z","updated_at":"2025-04-14T15:12:54.152Z","avatar_url":"https://github.com/tarantool.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"NoSQL Benchmark\n===============\n\nNoSQL Benchmark (nb) is a multi-threaded benchmark tool for evaluating main\ndatabase performance metrics using OLTP-like benchmarking against\na specified workload.\n\nFeatures include:\n\n* benchmarking types: unlimited, time limited or maximum thread limited\n* different threads creation policies: at once or interleaved\n* key distribution supported: uniform, gaussian\n* key types supported: string, u32, u64\n* CSV report file generation supported (for future plot generation)\n* single configuration file\n* workload tests are specified in percents against a total request count\n* supported database drivers: tarantool, leveldb (redis, memcached planned).\n* plotter tool (CSV to GNU Plot generation)\n\nDownloading and installing\n--------------------------\n\nThe instructions here are for Linux.\nThe package should also work on FreeBSD.\n\nWe assume that it is okay to use the $HOME directory.\nIf this is not the case, then change all occurrences\nof the word $HOME in this document to whatever seems\nmore appropriate.\n\nWe assume tht it is okay to use sudo for installation\nof some common packages from the distro or from\nTarantool's github repository.\n\nBefore installing tarantool-nosqlbench, it is a good idea to\ninstall Tarantool itself from source following the instructions\nin the Tarantool manual\nhttps://www.tarantool.io/en/doc/2.5/dev_guide/building_from_source/.\nMany of the packages that you install for Tarantool\nare also necessary for tarantool-nosqlbench, and it\nwill be easier to run initial tests if you can start\na server on localhost.\n\n```\n\n# Install packages which should be available from your distro.\n# The following is a common way to install them on Ubuntu\nsudo apt-get install git cmake make build-essential libev-dev\n# The following is a common way to install them on Fedora\nsudo dnf install git cmake make coreutils gcc gcc-c++ libev-devel\n\n# Install msgpuck from a Tarantool github repository.\n# This is necessary for tarantool-c.\ncd $HOME\ngit clone https://github.com/tarantool/msgpuck\ncd msgpuck\ncmake .\nmake\nsudo make install\n\n# Install tarantool-c from a Tarantool github repository.\ncd $HOME\ngit clone https://github.com/tarantool/tarantool-c\ncd tarantool-c\ncmake .\nmake\nsudo make install\n\n# Set an environment variable to the tarantool-nosqlbench directory.\n# The suggestion $HOME/tarantool-nosqlbench is a common location.\n# This assumes you use bash.\nexport TARANTOOL_NOSQLBENCH=\"$HOME/tarantool-nosqlbench\"\n\n# Download the source of tarantool-nosqlbench\ngit clone https://github.com/tarantool/nosqlbench $TARANTOOL_NOSQLBENCH\n\n# Edit one of the files using your favorite text editor.\n# The file name is $TARANTOOL_NOSQLBENCH/src/CMakeLists.txt.\n# The change is in the line\n# set(nb_libs tnt mc ev ${M_LIB})\n# it should be\n# set(nb_libs tarantool mc ev ${M_LIB})\n# Here is one way to do it where we assume the sed editor exists.\ncd $TARANTOOL_NOSQLBENCH\nsed -i 's/set(nb_libs tnt mc ev /set(nb_libs tarantool mc ev /' src/CMakeLists.txt\n\n# Copy a file from the directory that you created earlier when\n# you said \"git clone https://github.com/tarantool/msgpuck\".\nmkdir $TARANTOOL_NOSQLBENCH/src/msgpuck\ncp $HOME/msgpuck/msgpuck.h $TARANTOOL_NOSQLBENCH/src/msgpuck/msgpuck.h\n\n# Build!\ncd $TARANTOOL_NOSQLBENCH\ncmake .\nmake\n\n# When running CMake you should see these warnings:\n# -- Could NOT find LEVELDB (missing: LEVELDB_LIBRARIES LEVELDB_INCLUDE_DIRS)\n# -- Could NOT find NESSDB (missing: NESSDB_LIBRARIES NESSDB_INCLUDE_DIRS)\n# ... This is okay. LevelDB and NessDB should not be installed.\n\n# There are other options, for example using a different C connector.\n# They can be seen by looking at the source of CMakeLists.txt.\n```\n\nRunning, The First Time\n-----------------------\n\n```\n# Start a Tarantool server.\n# The host will be localhost and the port will be 3303,\n# this can be changed by editing src/nosqlbench.conf as we'll see later.\n# The nosqlbench user name will be 'guest', so make sure 'guest' can do things.\n# (This is just for a test, make sure it is not a production system.)\n# The 'guest' user does not require a password.\n# To avoid error ER_MEMORY_ISSUE \"Failed to allocate %u bytes in %s for %s\",\n# set the amount of memory needed for the memtx storage engine to 1GB.\n# To avoid warnings on the server saying \"readahead limit is reached\",\n# we set readahead to a value that is larger than the default (16384).\n# There are lots more ways to \"tune\" the DBMS, but we leave them up to our users.\n# Start with an empty database, that is, the default directory should have no database files.\n# The space name does not have to be \"512\" -- it can be anything -- but nosqlbench\n# will look for the first space with a non-system id, which happens to be id=512.\n# We are calling this empty directory tarantool_sandbox, it can be anything.\n# We are assuming that the Tarantool server can be started by saying tarantool,\n# but it can be wherever you downloaded to when preparing.\n\nmkdir $HOME/tarantool_sandbox\ncd $HOME/tarantool_sandbox\ntarantool\nbox.cfg{listen = 3303, memtx_memory = 2^30, readahead = 250000}\nbox.schema.user.grant('guest','read,write,execute,create,drop','universe')\nbox.schema.space.create(\"512\")\nbox.space[\"512\"]:create_index(\"I\")\n\n# Now, on a different shell, run nb, the main tarantool-nosqlbench program.\n# There is one mandatory argument, the name of a configuration file.\n# Luckily for test purposes, there is a default configuration file\n# named nosqlbench.conf which has many settings with default values.\n# We assume that the file libtarantool.so, which you installed earlier\n# when you said \"sudo make install\" for tarantool-c, is now on a directory\n# such as /usr/local/lib. You might need to specify for the loader, e.g.\n# export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib\n\nexport TARANTOOL_NOSQLBENCH=\"$HOME/tarantool-nosqlbench\"\ncd $TARANTOOL_NOSQLBENCH\nsrc/nb src/nosqlbench.conf\n\n# Let it run while it is saying \"Warmup\".\n# Then let it run for a while, while it is displaying results at intervals.\n# You will see displays for one-second intervals, and for totals, with histograms.\n```\n\nChanging the options\n--------------------\n\nIf you got as far as seeing some displays when running the instructions\nin the previous section, then you are now ready to change the settings\nand tune the database. To do this, look at the nosqlbench.conf file\nand make some changes.\nFor example you can change the host from \"localhost\" and\nyou can change the port from \"3303\".\nBut most of the changes involve how to stress the DBMS differently,\nas you will see just by looking at the names of the settings.\nYou will also find that some of the DBMS's default settings will\nbe inappropriate when you run stressful tests, the solution then\nis to check the Tarantool user manual \"configuration\" reference\nhttps://www.tarantool.io/en/doc/2.5/reference/configuration/\nand see what tuning can do.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarantool%2Fnosqlbench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftarantool%2Fnosqlbench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftarantool%2Fnosqlbench/lists"}