microsoftarchive / redis

Redis is an in-memory database that persists on disk. The data model is key-value, but many different kind of values are supported: Strings, Lists, Sets, Sorted Sets, Hashes

Home Page:http://redis.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

redis-benchmark parameter is --dbnum not -dbmum

chengweng opened this issue · comments

C:\Users\admin\Downloads\Redis-x64-3.2.100>redis-benchmark.exe --help
Usage: redis-benchmark [-h <host>] [-p <port>] [-c <clients>] [-n <requests]> [-k <boolean>]

 -h <hostname>      Server hostname (default 127.0.0.1)
 -p <port>          Server port (default 6379)
 -s <socket>        Server socket (overrides host and port)
 -a <password>      Password for Redis Auth
 -c <clients>       Number of parallel connections (default 50)
 -n <requests>      Total number of requests (default 100000)
 -d <size>          Data size of SET/GET value in bytes (default 2)
 -dbnum <db>        SELECT the specified db number (default 0)
 -k <boolean>       1=keep alive 0=reconnect (default 1)
 -r <keyspacelen>   Use random keys for SET/GET/INCR, random values for SADD
  Using this option the benchmark will expand the string __rand_int__
  inside an argument with a 12 digits number in the specified range
  from 0 to keyspacelen-1. The substitution changes every time a command
  is executed. Default tests use this to hit random keys in the
  specified range.
 -P <numreq>        Pipeline <numreq> requests. Default 1 (no pipeline).
 -q                 Quiet. Just show query/sec values
 --csv              Output in CSV format
 -l                 Loop. Run the tests forever
 -t <tests>         Only run the comma separated list of tests. The test
                    names are the same as the ones produced as output.
 -I                 Idle mode. Just open N idle connections and wait.

--dbnum
图片

-dbnum
图片

code:
redis-benchmark.c 609 line

} else if (!strcmp(argv[i],"--dbnum")) {
            if (lastarg) goto invalid;
            config.dbnum = atoi(argv[++i]);
            config.dbnumstr = sdsfromlonglong(config.dbnum);
        } else if (!strcmp(argv[i],"--help")) {

Hi @chengweng,
as mentioned in the official https://github.com/microsoftarchive/redis/blob/3.0/README.md
this project is no longer being actively maintained. If you are looking for an up-to-date alternative, you may want to check out Memurai.

@bettojanea Why should I choose Memurai over https://github.com/tporadowski/redis if I need it for production?

Hi @chengweng,
as mentioned in the official https://github.com/microsoftarchive/redis/blob/3.0/README.md
this project is no longer being actively maintained. If you are looking for an up-to-date alternative, you may want to check out Memurai.

Okay thank you

Hi @aberbegall , thanks for asking.
Memurai has a software company behind it, Janea Systems, which offers consulting services to Fortune 500 companies since 2003.
Janea Systems provides Enterprise level support for Memurai customers. We, the Memurai Team, can respond immediately to customer production issue as well as act immediately on newly discovered Redis security vulnerabilties.

-dbnum was incorrectly specified in help message in version 3.2.100, but always parsed as --dbnum. This was improved later in my updated fork as detailed in this comment to issue tporadowski/redis/#85

@bettojanea Ok, so I now understand better that each project has its own Commercial vs Open source approach and Enterprise support vs Community support. Thanks for your answer.