Why Tokyo Tyrant so slow
- by Tantra
I have follow situation tyrant server lunched on freebsd host, like this:
ttserver -uas -log /data/tyrant/1.log -sid 1 -thnum 8 -tout 5 /data/tyrant/data/1.tct
And i try to communicate this server on windows from python and pyrant-0.3.5: like this:
import pyrant;
import time;
t = pyrant.Tyrant(host="192.168.0.220", port=1978);
tbegin = time.time();
for i in xrange(4000000):
if i and ((i % 10000) == 0):
print time.time() - tbegin;
tbegin = time.time();
t[i] = {"text": "ruslan text", "value": i};
and have i think very slow performance about 5-6 per 10,000 records. But if i start this code on the same machine like server(ttserver). Performance are good - about 0.5 sec per 10,000 records
What i must do to workaround this problem?