lsbardel / python-stdnet

Object-data mapper and advanced query manager for non relational databases
http://lsbardel.github.com/python-stdnet/
BSD 3-Clause "New" or "Revised" License
120 stars 20 forks source link

Limit pipeline size in redis #40

Open lsbardel opened 12 years ago

lsbardel commented 12 years ago

As redis documentations says

while the client sends commands using pipelining, the server will be forced to queue the replies, using memory. So if you need to send many many commands with pipelining it's better to send this commands up to a given reasonable number, for instance 10k commands, read the replies, and send again other 10k commands and so forth. The speed will be nearly the same, but the additional memory used will be at max the amount needed to queue the replies for this 10k commands.