Skip to content

zakharauvital/redis-mget-get-pipeline-benchmark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Redis MGET VS GET VS GET + pipeline benchmark

This benchmark shows us how faster MGET is compared to GET and GET that is wrapped with Redis' pipeline technique.

What does this benchmark do?

  • benchmark-redis-test.php creates 1 000 000 keys in Redis
    • invokes one MGET call with 60 keys
    • invokes 60 times GET with 1 key
    • invokes 60 times GET with 1 key is wrapped with Redis' pipeline technique
    • calculates execution time for every case

Need to have the following software:

docker >= 20.10.xx
Docker Compose version >= v2.x.x

How to run?

docker compose up -d

How to stop?

docker compose down

Conclusion

One invoke MGET is faster than 60x GET and is faster than 60x GET is wrapped with Redis' pipeline technique.

You will be able to see the following results:

Connection to Redis is successfully

Redis' keys is generating...
Generation is successfully

Time get x60: 4.133939743042 ms
Time get x60 with pipeline : 0.12397766113281 ms
Time mget x1: 0.092983245849609 ms

About

Redis MGET VS GET VS GET + pipeline benchmark

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published