Aerospike Benchmark (asbench)
For the complete documentation index see: llms.txt
All documentation pages available in markdown.
The Aerospike Benchmark tool is a C-based tool that measures the performance of an Aerospike cluster. It can mimic real-world workloads with configurable record structures, access patterns, and UDF calls.
Install asbench on Linux with the aerospike-asbench package. See Install tools on Linux with a package manager.
Usage
The --help option of asbench gives an overview of all supported command line options.
The -V or --version option prints the current version of asbench.
asbench --helpConnection options
| Option | Default | Description |
|---|---|---|
-h or --hosts HOST_1:TLSNAME_1:PORT_1[,...] | 127.0.0.1 | List of seed hosts. TLSNAME is only used when connecting with a secure TLS-enabled server. If the port is not specified, the default port is used. IPv6 addresses must be enclosed in square brackets. |
-p or --port PORT | 3000 | Default port on which to connect to Aerospike. |
-U or --user USER | User name. This is mandatory if security is enabled on the server. | |
-P [PASSWORD] | User’s password for Aerospike servers that require authentication. Without a value, the system asks you to enter the password. Starting with Tools 13.2.0, the value can be env:VAR, env-b64:VAR, b64:VALUE, file:PATH, or secrets:.... See Password and secret sources. | |
--auth MODE | INTERNAL | Set the authentication mode when user/password is defined. Replace MODE with one of the following: INTERNAL, EXTERNAL, EXTERNAL_INSECURE, or PKI. This mode must be set to EXTERNAL when using LDAP. |
-tls or --tls-enable | disabled | Use TLS/SSL sockets. |
--services-alternate | false | Use to connect to alternate-access-address when the cluster nodes publish IP addresses through access-address which are not accessible over WAN, or to connect to alternate IP addresses accessible over WAN through alternate-access-address. |
TLS options
| Option | Default | Description |
|---|---|---|
--tls-cafile=TLS_CAFILE | Path to a trusted CA certificate file. | |
--tls-capath=TLS_CAPATH | Path to a directory of trusted CA certificates. | |
--tls-name=TLS_NAME | Default TLS name used to authenticate each TLS socket connection. This must match the cluster name. | |
--tls-protocols=TLS_PROTOCOLS | -all +TLSv1.2 if the connection supports TLSv1.2. -all +TLSv1 if it doesn’t. | TLS protocol selection criteria. Uses Apache’s SSLProtocol format. |
--tls-cipher-suite=TLS_ | TLS cipher selection criteria. Uses Open_SSL’s Cipher List Format. | |
--tls-keyfile=TLS_KEYFILE | Path to the key for mutual authentication, if the Aerospike cluster supports it. | |
--tls-keyfile-password=TLS_ | Password to load a protected TLS keyfile. Replace TLS_KEYFILE_PASSWORD with one of the following: - An environment variable env:VAR.- A base64-encoded environment variable env-b64:VAR (Tools 13.2.0 and later).- A base64-encoded string b64:VALUE (Tools 13.2.0 and later).- The path to a file file:PATH. - A secret from Aerospike Secret Agent secrets:... (Tools 13.2.0 and later). - A string: PASSWORD. If --tls-keyfile-password is specified and no password is provided, the system responds by asking you to enter the user’s password. | |
--tls-certfile=TLS_CERTFILE PATH | Path to the chain file for mutual authentication, if the Aerospike cluster supports it). | |
--tls-cert-blacklist PATH | Path to a certificate blacklist file. The file should contain one line for each blacklisted certificate. Each line starts with the certificate serial number expressed in hexadecimal format. Serial numbers are only required to be unique per issuer. Each entry may optionally specify the issuer name of the certificate. Example:86EC7A484 /C=US/ST=CA/O=Acme/OU=Eng/CN=TestChainCA | |
--tls-crl-check | Enable CRL checking for leaf certificate. An error occurs if a valid CRL file cannot be found in tls_capath. | |
--tls-crl-check-all | Enable CRL checking for the entire certificate chain. An error occurs if a valid CRL file cannot be found in tls_capath. | |
--tls-log-session-info | Log TLS connected session info. | |
--tls-login-only | Use TLS for node login only. |
The TLS name is only used when connecting with a secure TLS-enabled server.
The following example runs the default benchmark on a cluster of nodes 1.2.3.4 and 5.6.7.8 using:
- The default Aerospike port of
3000. - TLS configured.
- Namespace
TEST.
asbench --hosts 1.2.3.4:cert1:3000,5.6.7.8:cert2:3000 --namespace TEST --tls-enable --tls-cafile /cluster_name.pem --tls-protocols TLSv1.2 --tls-keyfile /cluster_name.key --tls-certfile /cluster_name.pemSecret Agent options
Starting with Tools 13.2.0, asbench can fetch --password and --tls-keyfile-password values from Aerospike Secret Agent with the secrets: form. Use the following options to connect to the Secret Agent. asbench reads these options from the command line only.
The following example reads the password from the Secret Agent resource resource1 and the secret pass:
asbench --sa-address 127.0.0.1:3005 -U admin -P secrets:resource1:passGlobal options
| Option | Default | Description |
|---|---|---|
-z or --threads THREAD_COUNT | 16 | Number of threads used to perform synchronous read/write commands. Replace THREAD_COUNT with the number of threads. |
--compress | disabled | Enable binary data compression through the Aerospike client. Internally, this sets the compression policy to true. |
--socket-timeout MS | 30000 | Read/Write socket timeout in milliseconds. Replace MS with the number of milliseconds. |
--read-socket-timeout MS | 30000 | Read socket timeout in milliseconds. Replace MS with the number of milliseconds. |
--write-socket-timeout MS | 30000 | Write socket timeout in milliseconds. Replace MS with the number of milliseconds. |
-T or --timeout MS | 0 | Read/Write total timeout in milliseconds. Replace MS with the number of milliseconds. |
--read-timeout MS | 0 | Read total timeout in milliseconds. Replace MS with the number of milliseconds. |
--write-timeout MS | 0 | Write total timeout in milliseconds. Replace MS with the number of milliseconds. |
--max-retries RETRIES_COUNT | 1 | Maximum number of retries before aborting the current transaction. Replace RETRIES_COUNT with the number of retries. |
-d or --debug | disabled | Run benchmark in debug mode. |
-S or --shared | disabled | Use shared memory cluster tending. |
-C or --replica REPLICA_TYPE | master | Which replica to use for reads. Replace REPLICA_TYPE with one of the following:- master: Always use the node containing the master partition.- any: Distribute reads across master and proles in round-robin fashion.- sequence: Always try master first. If master fails, try proles in sequence. - preferRack: Always try node on the same rack as the benchmark first. If no nodes on the same rack, use sequence. This option requires you to set rack-id. |
--rack-id RACK_ID | Which rack this instance of the asbench resides on. Required with replica policy prefer-rack. Replace RACK_ID with the rack’s ID. | |
-N or --read-mode-ap READ_MODE | one | Read mode for AP (availability) namespaces. Replace READ_MODE with either one or all. |
-B or --read-mode-sc SC_ | session | Read mode for SC (strong consistency) namespaces. Replace SC_READ_MODE with one of the following: session, linearize, allowReplica, or allowUnavailable. |
--read-touch-ttl-percent PERCENT | 0 | Reset a record’s TTL on reads near its end of life, which lets Aerospike act as a read-based LRU cache. The option sets the client read policy read_touch_ttl_percent for single reads, batch reads, and CDT workload reads, in synchronous and asynchronous mode. Replace PERCENT with one of the following: - 0: Use the namespace or set default-read-touch-ttl-pct. - -1: Never reset the TTL on reads. - 1 to 100: A read in the last PERCENT% of the most recent write TTL resets the TTL. For example, with a write TTL of 10 hours and a value of 80, a read in the last 8 hours of the record’s life resets the TTL to 10 hours. A non-zero value requires Database 7.1.0 or later. Available in Tools 13.2.0 and later. |
-M or --commit-level LEVEL | all | Write commit guarantee level. Replace LEVEL with either all or master. |
-Y or --conn-pools-per-node POOLS_COUNT | 1 | Number of connection pools per node. Replace POOLS_COUNT with the number of connection pools. |
-D or --durable-delete | disabled | All transactions set the durable-delete flag which indicates to the server that if the transaction results in a delete, generate a tombstone for the deleted record. |
--send-key | disabled | Enables the key policy AS_POLICY_KEY_SEND, which sends the key value in addition to the key digest. |
--sleep-between-retries | 0 | Enables sleep between retries if a transaction fails and the timeout was not exceeded. |
-c or --async-max-commands COMMAND_COUNT | 50 | Maximum number of concurrent asynchronous commands that are active at any time. Replace COMMAND_COUNT with the number of commands. |
-W or --event-loops THREAD_COUNT | 1 | Number of event loops (or selector threads) when running in asynchronous mode. Replace THREAD_COUNT with the number of threads. |
Namespace and record format options
| Option | Default | Description |
|---|---|---|
-n or --namespace NAMESPACE_NAME | test | Aerospike namespace to perform all operations under. Replace NAMESPACE_NAME with the name of the namespace. |
-s or --set SET_NAME | testset | Aerospike set to perform all operations in. Replace SET_NAME with the name of the set. |
-b or --bin BIN_NAME | testbin | Base name to use for bins. Replace BIN_NAME with the name you want to use.- The first bin is named BIN_NAME, the second is BIN_NAME_2, the third BIN_NAME_3.- An unnamed bin keeps the name derived from --bin and its position in the object spec. For example, with -o "id=@uuid, I" the second bin is testbin_2.- A name that matches another bin’s name, such as testbin_2, is rejected.- For a repeated bin, the name plus its _N suffix must fit in 15 characters. |
-K or --start-key KEY_ | 0 | Set the starting value of the working set of keys. Replace KEY_STARTING_VALUE with the starting value. If you are using an insert workload, start-key indicates the first value to write. Otherwise, start-key indicates the smallest value in the working set of keys. |
-k or --keys KEYS_COUNT | 1000000 | Set the number of keys the client is dealing with. Replace KEYS_COUNT with the number of keys. If you are using an insert workload, the client writes this number of keys, starting from value = start-key. Otherwise, the client reads and updates randomly across the values between start-key and start-key + num_keys. |
-o or --object-spec OBJECT_TYPE | I4 | Set the bin specifications. Replace OBJECT_TYPE with a comma-separated list of bin specifications. See object spec for more details. You can also use synthetic data generators and named bins. |
--seed SEED | Makes the generated record data reproducible. Replace SEED with an integer. See Reproducible data. Available in Tools 13.2.0 and later. | |
--compression-ratio RATIO | 1 | Sets the compression ratio for binary data. Replace RATIO with the desired ratio. This option causes the benchmark tool to generate binary data which is roughly compressed by this proportion. Note: this is only applied to B<n> binary data, not to any of the other types of record data. |
-e or --expiration-time | 0 | Set the TTL of all records written in write transactions. Available options are: - -1: No TTL, never expire.- -2: Do not modify the record TTL with this write transaction.- 0: Adopt the default TTL value from the namespace.- >0: TTL of the record in seconds. |
Object spec
The object spec is a flexible way to describe how to structure records being written to the database. The object spec is a comma-separated list of bin specs. Each bin spec is one of the following:
Variable Scalars:
| Type | Format | Description |
|---|---|---|
| Boolean | b | A random boolean bin/value. |
| Integer | I<n> | A random integer with the lower n bytes randomized (and the rest remaining 0). n can range from 1 to 8.Note: the nth byte is guaranteed to not be 0, except in the case n=1. |
| Double | D | A random double bin/value (8 bytes). |
| String | S<n> | A random string of length n of either lowercase letters a-z or numbers 0-9. |
| Binary Data | B<n> | Random binary data of length n bytes.Note: if --compression-ratio is set, only the first ratio * n bytes are random. The rest are 0. |
Constant Scalars:
| Type | Format | Example | Notes |
|---|---|---|---|
| Const Boolean | true/T or false/F | true | The full-word forms are case-insensitive, but T and F must be capitalized. |
| Const Integer | A decimal, hex (0x…), or octal (0…) number | 123 | |
| Const Double | A decimal number with a . | 123.456 | Const doubles may optionally be followed by “f” or “F”, but must always contain a decimal. |
| Const String | A backslash-escaped string enclosed in double quotes | ”this -> ” is a double quote\n” | Strings are backslash-escaped, but so are most terminals, so make sure to escape your backslashes with backslashes when writing object specs in a command line argument. Additionally, double quotes are often special characters, so escape those too. |
Collection Bins:
| Type | Format | Notes |
|---|---|---|
| List | [BIN_SPEC,...] | A list of one or more bin specs separated by commas. |
| Map | {SCALAR_ | A list of one or more mappings from a scalar bin spec to a bin spec. Anything but a List or Map. These describe the key-value pairs that the Map contains. |
Generators:
| Type | Format | Notes |
|---|---|---|
| Generator | @GENERATOR[(ARGUMENTS)] | A realistic synthetic value, such as a name or an email address. Available in Tools 13.2.0 and later. See Synthetic data generators. |
Named bins
Starting with Tools 13.2.0, you can name any top-level bin by putting NAME= before its spec, for example -o "first=@first_name, age=@int(18,90)". The following rules apply:
- A name is 1 to 15 characters of letters, digits,
_, or-, starts with a letter or_, and is unique in the object spec. - Unnamed bins keep the names derived from
--bin, such astestbinandtestbin_2. - A repeated named bin such as
tags=3*@wordproduces the binstags,tags_2, andtags_3. --read-binsand--write-binsstill select bins by position, starting from 1, whatever the bin names.
Synthetic data generators
Starting with Tools 13.2.0, a generator produces a realistic value from dictionaries compiled into asbench, which hold US English names, cities, streets, companies, products, and words. You can use a generator anywhere you can use a scalar: as a top-level bin, a list element, a map value, or a map key. A generator used as a map key must produce strings or integers.
[NAME=][N*]@GENERATOR[(ARGUMENT, ARGUMENT, ...)]Arguments are integers, doubles, or strings enclosed in double quotes. @pick also accepts weighted items such as "a":70.
The following notes apply to generators:
@dateand@timestampbounds are epoch seconds or"YYYY-MM-DD"dates. Both default to 2020-01-01 through 2029-12-31.@lat,@lon,@geojson, and@geo_circledefault to the continental US, with latitude 24 to 49 and longitude -125 to -66. The default@geo_circleradius is 100 to 5000 meters.@fmtplaceholders accept any string, integer, or double generator with its arguments, for example@fmt("SKU-#{int(1000,9999)}").- A map cannot ask for more unique keys than the key generator has distinct values. For example,
{60*@state:I}is rejected because there are 50 states. - An object spec that contains generators generates a new record for every write, as if you gave
--random. @geojsonand@geo_circlewrite native GeoJSON values, not strings, so you can index them withGEO2DSPHERE, including inside lists and maps.- Values are ASCII only, and address fields are drawn independently, so the city, state, and ZIP code in one record do not necessarily match.
The following example writes one million customer profiles:
asbench -h 127.0.0.1 -n test -s customers -w I -k 1000000 --seed 42 \ -o "id=@uuid, first=@first_name, last=@last_name, email=@email, age=@int(18,90), city=@city, loc=@geojson"The examples/synth directory of the asbench repository has ready-to-run workload stages files for customer profiles, orders, IoT devices, activity feeds, time series, sessions, and leaderboards.
Reproducible data
Starting with Tools 13.2.0, the --seed option makes each record a function of the seed, the record key, and the object spec. Each bin has its own random stream, so:
- The same key always gets the same bins, whatever the thread count, batch write size, or asynchronous mode.
- A partial write with
--write-binsproduces the same values that the full record has in those bins. - You can verify a load later by regenerating it with the same seed.
@now does not depend on the seed. CDT workloads draw values from a per-thread stream seeded by --seed and the thread number, so they are reproducible with a single thread (-z 1). Without --seed, each thread uses its own independently seeded random stream.
Multipliers
Multipliers are positive integer constants, followed by an asterisk *, preceding a bin spec.
In the root-level object spec, multipliers indicate how many times to repeat a bin spec across separate bins. For example, the following object specs are equivalent:
I, I, I, I, S10, S10, S10 = 4*I, 3*S10123, 123, 123, "string", "string" = 3*123, 2*"string"In a list, multipliers indicate how many times to repeat a bin spec in the list. The following are equivalent:
[I, I, I, I, S10, S10, S10] = [4*I, 3*S10]In a map, multipliers must precede variable scalar keys. Multipliers indicate how many unique key-value pairs of the given format to insert into the map. Multipliers may not precede const key bin specs or value bin specs in a key-value mapping. The following are equivalent:
{I:B10, I:B10, I:B10} = {3*I:B10}Workloads
The benchmark tool uses workloads to interact with the Aerospike database. The workload types are:
I: Linear Insert. Runs over the range of keys specified and inserts a record with that key.RU,READ_PCT[,READ_PCT_ALL_BINS[,WRITE_PCT_ALL_BINS]]: Random Read/Update. Randomly picks keys, and either writes a record with that key or reads a record from database with that key, with probability according to the given read percentage.- Replace
READ_PCTwith a number between 0 and 100. 0 means only do writes. 100 means only do reads. - Starting with asbench 1.5 (Tools 7.1), you may optionally provide
READ_PCT_ALL_BINS,WRITE_PCT_ALL_BINSto indicate the percentage of reads and writes that read the entire record. Otherwise only read the first bin. Default is 100.
- Replace
RR,READ_PCT[,<READ_PCT_ALL_BINS[,REPLACE_PCT_ALL_BINS]]: Random Read/Replace/Function. Same asRU, except replaces record instead of updates.RUF,READ_PCT,WRITE_PCT[,READ_PCT_ALL_BINS[,WRITE_PCT_ALL_BINS]]: Random Read/Update/Function. Same asRU, except may also perform an apply command on the random key with a given UDF function.- The percentage of operations that are function calls (UDFs) is
100 - READ_PCT - WRITE_PCT. This value must not be negative, which is checked for at initialization.
- The percentage of operations that are function calls (UDFs) is
RUD,READ_PCT,WRITE_PCT[,READ_PCT_ALL_BINS[,WRITE_PCT_ALL_BINS]]: Random Read/Update/Delete. Same asRU, except may also perform deletes on a random key.- The percentage of operations that deletes is
100 - READ_PCT - WRITE_PCT. This value must not be negative, which is checked for at initialization.
- The percentage of operations that deletes is
C[I|K][,READ_PCT[,CAP[,READ_COUNT]]]: List and map (CDT) workloads. See CDT workloads. Available in Tools 13.2.0 and later.DB: Delete bins. Same asI, but deletes the record with the given key from the database.- In order for
DBto delete entire records, it must delete every bin that the record contains. Since bin names are based on their position in the object spec, when running this workload, verify you are using the same object spec you used to generate the records being deleted. - If you only want to delete a subset of bins, use
write-binsto select which bins to delete.DBdeletes all bins by default and uses write-bins to determine which bins to delete.
- In order for
CDT workloads
Starting with Tools 13.2.0, the C, CI, and CK workloads exercise list and map operations on records instead of whole-record puts.
-w C[I|K][,READ_PCT[,CAP[,READ_COUNT]]]READ_PCTis the percentage of operations that are reads. The default is 50.CAPis the number of elements to keep. After each write, a list keeps its lastCAPelements, aCorCKmap keeps itsCAPlargest keys, and aCImap keeps itsCAPhighest values. The default is 0, which means no trimming. With no cap, collections grow until long runs fail with record-too-big errors, so set a cap for long runs.READ_COUNTis the number of elements a read returns. The default is 10. A list read returns the lastREAD_COUNTelements, aCmap read returns the lastREAD_COUNTentries by key, and aCImap read returns the topREAD_COUNTentries by rank.
Each key takes one operate() call, in synchronous and asynchronous mode. Scalar bins are written and read normally. CI needs map values that are integers, doubles, or @int, @double, or @timestamp generators, and increments at most 1000 map entries per write. Do not run an insert workload before a CI workload, so that asbench creates the maps in value order. CDT workloads do not support batch sizes, --read-bins, or --write-bins.
The following example runs a leaderboard workload that increments 5 player scores per write, keeps the top 1000, and reads the top 10:
asbench -n test -s boards -k 10000 -w CI,30,1000,10 -t 60 -o "scores={5*@username:@int(1,100)}"Workload options
| Option | Default | Description |
|---|---|---|
--read-bins | all bins | Specifies which bins from the object-spec to load from the database on read transactions. Must be given as a comma-separated list of increasing bin numbers, starting from 1. |
--write-bins | all bins | Specifies which bins from the object-spec to generate and store in the database on write transactions. Must be given as a comma-separated list of bin numbers, starting from 1. |
-R or --random | disabled | Use dynamically-generated random bin values for each write transaction instead of fixed values (one per thread) created at the beginning of the workload. |
-t or --duration SECONDS | 10 for RU,RUF workloads, 0 for I,DB workloads | Specifies the minimum amount of time the benchmark runs for. Replace SECONDS with the number of seconds. For random workloads with no finite amount of work needing to be done, this value must be above 0 for anything to happen. For workloads with a finite amount of work, like linear insertion/deletion, set this value to 0. |
-w or --workload WORKLOAD_TYPE | RU,50 | Desired workload. Replace WORKLOAD_TYPE with the workload type. |
--workload-stages PATH/TO/WORKLOAD_STAGES.yaml | disabled | Accepts a path to a workload stages YAML file, which should contain a list of workload stages to run through. See workload stages. |
-g or --throughput TPS | 0 | Throttle transactions per second to a maximum value. Replace TPS with transactions per second. If transactions per second is zero, throughput is not throttled. |
--batch-size SIZE | 1 | Enable all batch modes with a number of records to process in each batch call. Replace SIZE with the number of records. Batch mode is applied to the read, write, and delete transactions in I, RU, RR, RUF, and RUD workloads. If batch size is 1, batch mode is disabled. |
--batch-read-size SIZE | 1 | Enable batch read mode with a number of records to process in each batch read call. Replace SIZE with the number of records. Batch read mode is applied to the read transactions in RU, RR, RUF, and RUD workloads. If batch read size is 1, batch read mode is disabled. Batch read size takes precedence over batch size. |
--batch-write-size SIZE | 1 | Enable batch write mode with a number of records to process in each batch write call. Replace SIZE with the number of records. Batch write mode is applied to the write transactions in I, RU, RUF, and RUD workloads. If batch write size is 1, batch write mode is disabled. Batch write size takes precedence over batch size. |
--batch-delete-size SIZE | 1 | Enable batch delete mode with a number of records to process in each batch delete call. Replace SIZE with the number of records. Batch delete mode is applied to the delete transactions in RUD and BD workloads. If batch delete size is 1, batch delete mode is disabled. Batch delete size takes precedence over batch size. |
-a or --async | disabled | Enable asynchronous mode, which uses the asynchronous variant of every Aerospike C Client method for transactions. |
Workload stages
You can run multiple different workloads in sequence using the --workload-stages option with a workload stage configuration file, which is in YAML format. The configuration file should only be a list of workload stages in the following format:
- stage: 1# required arguments workload: WORKLOAD_TYPE# optional arguments duration: SECONDS tps : max possible with 0 (default), or specified transactions per second object-spec: Object spec for the stage. Otherwise, inherits from the previous stage, with the first stage inheriting the global object spec. key-start: Key start, otherwise inheriting from the global context key-end: Key end, otherwise inheriting from the global context read-bins: Which bins to read if the workload includes reads write-bins: Which bins to write to if the workload includes writes pause: max number of seconds to pause before the stage starts. Waits a random number of seconds between 1 and the pause. async: when true/yes, uses asynchronous commands for this stage. Default is false random: when true/yes, randomly generates new objects for each write. Default is false batch-size: specifies the batch size for all batch transactions for this stage. Default is 1 batch-read-size: specifies the batch size of reads for this stage. Takes precedence over batch-size. Default is 1 batch-write-size: specifies the batch size of writes for this stage. Takes precedence over batch-size. Default is 1 batch-delete-size: specifies the batch size of deletes for this stage. Takes precedence over batch-size. Default is 1- stage: 2 ...Each stage must begin with stage: STAGE_NUMBER, where STAGE_NUMBER is the position of the stage in the list. The stages must appear in order.
When arguments say they inherit from the global context, the value they inherit either comes from a command line argument, or is the default value if no command line argument for that value was given.
Below is an example workload stages file, call it workload.yml.
- stage: 1 duration: 60 workload: RU,80 object-spec: I2,S12,[3*I1]- stage: 2 duration: 30 workload: I object-spec: {5*S1:I1}To use workload.yaml with asbench, run the following.
asbench --workload-stages=workload.ymlLatency histograms
There are multiple ways to record latencies measured throughout a benchmark run. All latencies are recorded in microseconds.
Periodic latency histogram
Periodic latency data is stored in the --output-file specified and recorded in histograms with three ranges of fixed bucket sizes. The three ranges are not configurable. There is one histogram for reads, one for writes, and one for UDF calls.
The three ranges are:
- 100us to 4000us, bucket width 100us
- 4000us to 64000us, bucket width 1000us
- 64000us to 128000us, bucket width 4000us
Format of the histogram output file:
HIST_NAME UTC_TIME, PERIOD_TIME, TOTAL_LATENCIES, BUCKET_1_LOWER_BOUND:BUCKET_1_LATENCIES, ...HIST_NAME: Name of the histogram, eitherread_hist,write_hist, orudf_hist.UTC_TIME: UTC time of the end of the interval.PERIOD_TIME: Length of the interval in seconds.TOTAL_LATENCIES: Total number of transaction latencies recorded in the interval.BUCKET_1_LOWER_BOUND: Each bucket with at least one latency recorded is displayed in ascended number of interval lower bounds.BUCKET_1_LATENCIES: Number of transaction latencies falling within the bucket’s range.
HDR histogram
Transaction latencies can also be recorded in an HDR histogram. There is one HDR histogram for reads, one for writes, and one for UDF calls.
Use one of the following to enable HDR histograms:
--latency: Displays select percentiles from the HDR histograms everyoutput-periodseconds.- The percentiles that are printed when
--latencyis enabled can be configured with--percentilesfollowed by a comma-separated list of percentiles. This list must be in ascending order. No percentile can be less than 0, or greater than or equal to 100.
- The percentiles that are printed when
--hdr-hist: Writes the full HDR histograms to the given directory in both a human-readable text format (.txt) and a binary encoding of the HDR histogram (.hdrhist).
UDFs
UDF calls are made in RUF (read/update/function) workloads, being the “function” part of that workload. A key is chosen at random from the range of keys given, and an Aerospike apply call is made on that key with the given UDF function (--udf-function-name) from the given UDF package (--udf-package-name). Optionally, --udf-function-values may be supplied, which takes an object spec and randomly generates arguments every call.
| Option | Default | Description |
|---|---|---|
-upn or --udf-package-name PACKAGE_NAME | - | The package name for the UDF to be called. Replace PACKAGE_NAME with the package name. |
-ufn or --udf-function-name FUNCTION_NAME | - | Name of the UDF function in the package to be called. Replace FUNCTION_NAME with the function name. |
-ufv or --udf-function-values FUNCTION_VALUES | none | Arguments to be passed to the UDF when called, which are given as an object spec (see object spec). Replace FUNCTION_VALUES with the arguments. |