nicolasff / webdis

A Redis HTTP interface with JSON output
https://webd.is
BSD 2-Clause "Simplified" License
2.82k stars 305 forks source link

how to improve webdis concurrent performance per second #57

Closed mg00736448 closed 10 years ago

mg00736448 commented 11 years ago

Hardware environment :DELL 2950 8 CORE 8G RAM

Run REDIS-benchmark

====== PING_INLINE ======

33222.59 requests per second

====== PING_BULK ======

33444.82 requests per second

====== SET ======

39682.54 requests per second

====== GET ======

34965.04 requests per second

====== INCR ======

38610.04 requests per second

====== LPUSH ======

36764.70 requests per second

====== LPOP ======

34843.21 requests per second

====== SADD ======

37878.79 requests per second

====== SPOP ======

33783.79 requests per second

====== LPUSH (needed to benchmark LRANGE) ======

34129.69 requests per second

====== MSET (10 keys) ======

23584.91 requests per second

We use webdis proxy to operate REDIS through http request

Test tool webbench

setsid webbench -c 100 -t 60 http://111.1.3.68:7379/INCR/newcount setsid webbench -c 200 -t 60 http://111.1.3.68:7379/INCR/newcount Finally we read the newcount value to statistic the count of operations. We have increased the concurrent client computers but it has nothing to do with the final result. We use mutiple clients attack one server, it doesn't affect the result, either.

The operating counts per second are about 17000. The same as the LPUSH or LPOP operation.

the config file of WEBDIS { "redis_host": "127.0.0.1",

"redis_port":   6379,
"redis_auth":   null,

"http_host":    "0.0.0.0",
"http_port":    7379,
"threads":  8,

"daemonize":    false,
"websockets":   false,

"database": 0,

"acl": [
    {
        "disabled": ["DEBUG" , "FLUSHDB", "FLUSHALL"]
    },

    {
        "http_basic_auth":  "user:password",
        "enabled":      ["DEBUG"]
    }
],

    "verbosity": 3,
    "logfile": "webdis.log"

}

Now I want to seek help about how to improve webdis concurrent performance per second from you. How we can modify this system so the performance can approach to the result by RERDIS-BENCHMARK?

nicolasff commented 11 years ago

Hello,

There are a few things you can try, in order of decreasing importance:

By the way, your hardware seems over-proportioned for Redis, as it is single-threaded and will only make use of a single core. Could you also run the tests/bench.sh from the webdis directory and report the numbers?

Thanks.

mg00736448 commented 11 years ago

hi thanks for your answer first: Webdis runs well, " curl 'http://127.0.0.1:7379/GET/key' {"GET":null}" but the bench.sh no result response, I have try several times.

Testing on 127.0.0.1:7379 with 100 clients in parallel, for a total of 100000 requests per benchmark. PING: requests/sec. SET(hello,world): requests/sec. GET(hello): requests/sec. INCR(hello): requests/sec. LPUSH(hello,abc): requests/sec. LRANGE(hello,0,10): requests/sec. LRANGE(hello,0,100): requests/sec.

second Connect to Redis using a Unix socket.

how to config webdis for the Unix socket?

third webdis is single-threaded or multi-threaded?

nicolasff commented 11 years ago

@mg00736448:

Alekhyasnb commented 5 years ago

How to send json as an input to redis using http request