From: quasi <qua...@gm...> - 2006-04-13 13:58:57
Attachments:
cl-memcached.tar.gz
|
Hey folks, I am using SBCL 0.9.10 x64 with threads enabled build using SBCL 0.9.9 on a AMD64 Debian testing system. I have started to write a small library to interface with the memcached in memory caching server from www.danga.com/memcached/ The way I may have carried out the benchmarks newbie'ish. I will be delighted with suggestions to improve my methods to be more accurate and expansive. In the library I am opening and closing a socket for every request. I am using trivial-sockets. Intutively I think this is pretty dumb and it would improve performance to a great deal if I could have several sockets open which are reused. But there may be concurrency issues. (I will be primarily using this library from behind TBNL to store/fetch data using memcached and I think TBNL is multithreaded.) Frankly, I have hardly any knowledge of how this could be achieved in SBCL. Any pointers as to how this could be done and any relevent information I can refer will help me a lot. thanks, quasi These benchmarks done on a call to cl-memcached:memcached-get which return a 100Kb ascii string read from the memcached server (defun my-bench (n) (dotimes (i n) (cl-memcached:memcached-get "benchmark") t)) Ist test -------- (sb-profile:profile my-bench cl-memcached:memcached-get) (my-bench 10000) (sb-profile:report) seconds | consed | calls | sec/call | name ------------------------------------------------------------ 137.418 | 4,245,961,072 | 10,000 | 0.013742 | CL-MEMCACHED:MEMCACHED-G= ET 0.233 | 1,147,264 | 1 | 0.232659 | MY-BENCH ------------------------------------------------------------ 137.651 | 4,247,108,336 | 10,001 | | Total estimated total profiling overhead: 0.03 seconds overhead estimation parameters: 2.e-8s/call, 2.71e-6s total profiling, 1.176e-6s internal profiling IInd test --------- (sb-profile:profile cl-memcached:memcached-get) (my-bench 10000) (sb-profile:report) measuring PROFILE overhead..done seconds | consed | calls | sec/call | name ------------------------------------------------------------ 135.646 | 4,248,341,680 | 10,000 | 0.013565 | CL-MEMCACHED:MEMCACHED-G= ET ------------------------------------------------------------ 135.646 | 4,248,341,680 | 10,000 | | Total estimated total profiling overhead: 0.02 seconds overhead estimation parameters: 2.e-8s/call, 1.9060001e-6s total profiling, 7.6e-7s internal profiling When trying to use the statistical profiler : Ist time : (sb-sprof:start-profiling) (my-bench 10000) after about 10 seconds Lisp connection closed : exited abnormally with code 256 IInd time: this happened again when I tried the same. p.s. One call to (cl-memcached:memcached-get "benchmark") which returns a 100Kb text stream, in an Emacs Slime window resulted in the slime-completion buffer being overrun (or something) and the slime-completion stopped working. |