FAQ
Hi Gophers

I meet a strange problem when I optimize LedisDB one client get
performance. The get flow likes below:

1, read key from socket
2, get data with key from RocksDB
3, write data to socket

all the data size is 4k.

First I try to benchmark only network handling without db, just read key
from socket then write 4k data to socket, the RPS is about 12k.
Then I benchmark only db get, just get data from rocksdb, the RPS is about
60k.

As you see, for the above results, if I combine network + db, the RPS may
be 1 / (1/12 + 1/60) , about 10k RPS or a little less. But to my surprise,
the RPS is only 6k.

I let some people help me do the same benchmark and they get the same
result.

I doubted this was the problem for rocksdb, so I created an issue here
https://github.com/facebook/rocksdb/issues/383. I got some help but had no
progress.
I used go pprof and found the the most cpu was on cgo calling rocksdb get
function and syscall reading/writing socket.

I tried many ways to find why and optimize but had little effect badly.

Does anyone meet this problem, or give me some advice where to begin?

Thank you.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedNov 13, '14 at 2:05a
activeNov 13, '14 at 2:05a
posts1
users1
websitegolang.org

1 user in discussion

Siddon Tang: 1 post

People

Translate

site design / logo © 2021 Grokbase