I
I
Ivan Palamarchuk2017-04-29 04:12:51
PHP
Ivan Palamarchuk, 2017-04-29 04:12:51

How to speed up redis.get?

Good morning everyone!
Straight to the point. The front-end API only works with Redis. To "find" the answer, you need to make about 10-20 get requests to redis. When a load of more than 200 RPS appeared (at the moment ~ 250), the data search method began to slow down a lot. when the load is about 50-150 RPS, everything is ok, and then the response time starts to rise very much.
The Redis instance is located on the local network, the settings are approximately standard (the number of tcp connections has been increased, the maximum number of clients is 10k). The profiler gives me that it is get that slows everything down. What are the options for solving the problem?
PS
- everything is ok with the resources of the instance, redis does not even use 5% (it has no restrictions)
PPS
I apologize for interpreting the question, it's already morning, I'm thinking hard

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fortop, 2017-04-29
@Fortop

First, identify the bottleneck.
Who said it's a radish?
We put xhprof
We collect metrics We
analyze.
After that, we come back here with the right question

Hmm. I missed the profiler.
In this case, look at information about the size of the transmitted data (there may not be enough network bandwidth)
Try to disable snapshot to disk (it can slow down if the data is updated)
Replace 20 requests with one.
Redis allows you to extract multiple keys at the same time MGET

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question