> 85 seconds was because of the network latency (was using EC2 with my
> computer. pinging time was 350 ms itself..)
>
> Perhaps for x many number of items, it was taking x*350 ms time for
> making calls.. while mongo, it was sending all data at one go.
>
> So I ran the script on the server itself:
> storing in db  0.108298063278  for  1487  items
> storing in memcached  0.208426952362
> reading from db  0.0738799571991
> reading from memcached  0.145488023758
>
> what am I doing wrong here?

Can you attach your benchmark program?

You should be using multiget to fetch back items quicker. Try using
pylibmc, which is based off of libmemcached. That may be able to do
multisets and get you better speed. The other library is pure python, I
think. Would be slower than a native DB driver.

-Dormando

Reply via email to