Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^2: learning memcachedby punkish (Priest) |
on May 21, 2011 at 02:51 UTC ( [id://906022]=note: print w/replies, xml ) | Need Help?? |
> I think you benchmark is flawed. You say you have 20_000 random > entries, but you only make 2723 queries. How did you determine that I made only 2723 queries? The benchmark shows that I made 40_000 queries for each code fragment at a rate of 2723 queries per second with the memcache process and 3846 queries per second with the straight-from-db process. Or, am I reading the results wrong? Update: Here is another measurement, this time using timethese. The results are the same as before.
Whatever I am doing, it is far faster to open up the SQLite database every time and query it than it is to query the memory cached value. (I am creating a $dbh and $sth every time, and also opening a file and writing to it every time to kinda emulate a CGI process that starts afresh on every hit of the browser. when small people start casting long shadows, it is time to go to bed
In Section
Seekers of Perl Wisdom
|
|