Fragment caching with Memcached slow?

big mac wrote:

Hi,

I am trying to do fragment caching using :mem_cache_store. However,
when I
compare it to fragment caching using :file_store, it seems to be a lot
slower.

Here are the results:

uncache
Completed in 2.20246 (0 reqs/sec) | Rendering: 2.19891 (99%) | DB:
0.00017(0%) | 200 OK [
http://127.0.0.1/]

using file_store
Completed in 0.00952 (105 reqs/sec) | Rendering: 0.00702 (73%) | DB:
0.00000(0%) | 200 OK [
http://127.0.0.1/]

using memcache
Completed in 0.03558 (28 reqs/sec) | Rendering: 0.02561 (71%) | DB:
0.00000(0%) | 200 OK [
http://127.0.0.1/]

Other Notes:
- I've tried using both Ruby-MemCached0.4 and memcache-client libraries
and
the results are about the same.
- I am sure there is no paging.

Memcached execution parameters:
memcached -m 256 -l 127.0.0.1 -p 11211 -vv

ldd /usr/local/bin/memcached results:
        linux-gate.so.1 => (0x0036a000)
        libc.so.6 => /lib/libc.so.6 (0x0088e000)
        /lib/ld-linux.so.2 (0x00870000)

My environment: uname -a
Linux 2.6.14-1.1656_FC4 #1 Thu Jan 5 22:13:22 EST 2006 i686 athlon i386
GNU/Linux

I'm stumped. Isn't it memcache store should be faster than file store
since
there is no disk access? Would somebody be able to explain?

Thanks,
Mac

Hi,

That s a bit old post, but today I got the same. I have plenty of RAM,
use memcached gem and whatever I do, I can't go over 185 r/s with
mem_cache_store and go to 205 r/s with file_store. Every thing is on a
single freebsd machine, and I dont understand how file storage can be
faster than memory. Some other tests show memory_store is 10x faster on
rendering.

Anyone could help me to find the light ?

thanks,