Hi all,
I have made a simple script to test how fast Gearman's asynchronous
and persistent job is. However, I am a bit disappointed. It turned out
that Gearman is much slower than I think. I am using TokyoCabinet as
storage backend. TokyoCabinet is advertised to be very fast.
It takes me 30 - 31s to send 1000 background jobs to Gearmand. It
means that 1 asynchronous job takes 0.3s
- PHP 5.2.13
- Gearmand 0.13 + tokyocabinet 1.4.44 (for persistent job)
- Gearman PHP Extension (0.7.0)
- CentOS 5.4
- Start command: gearmand -d -uroot -q libtokyocabinet --
libtokyocabinet-file=/tmp/tokyo.tch --port=4730
- PHP Code:
http://gist.github.com/403660
- My disk speed test
/dev/cciss/c0d0p1:
Timing cached reads: 2908 MB in 2.00 seconds = 1454.40 MB/sec
Timing buffered disk reads: 76 MB in 3.04 seconds = 25.03 MB/sec
Test results
==========
[root@clipserver clients]# ./loop_client_reverse.php
Sending 1000 job
Elapsed time: 30.6671800613
[root@clipserver clients]# ./loop_client_reverse.php
Sending 1000 job
Elapsed time: 31.
2572209835
[root@clipserver clients]# ./loop_client_reverse.php
Sending 1000 job
Elapsed time: 30.
9182720184
Has someone experienced such as slowness?
Regards,
Dinh