WebClerk

每个人其实都行走在蓝天之下,如果你没有感觉到,那是因为你没有抬头向上看,而不是它不存在。

导航

Ubuntu beanstalkd 指南

Posted on 2013-03-06 10:33  WebClerk  阅读(637)  评论(0编辑  收藏  举报

安装:sudo apt-get install beanstalkd

运行:./beanstalkd –l 192.168.1.11 –p 11300

配置:

NAME
       beastalkd - A simple, fast work queue.
SYNOPSIS
       beanstalkd [options]
DESCRIPTION
       This  manual  page documents briefly the beanstalkd work-queue service.
       The beanstalk interface is generic, but  was  originally  designed  for
       reducing  the  latency of page views in high-volume web applications by
       running time-consuming tasks asynchronously.
OPTIONS
       A summary of options is included below.

       -b <dir>
              Use a binlog to keep jobs on persistent storage in  <dir>.  Upon
              startup,  beanstalkd  will recover any binlog that is present in
              <dir>, then,  during  normal  operation,  append  new  jobs  and
              changes in state to the binlog.

       -d     Detach and run beanstalkd as a daemon.

       -f <ms>
              Call  fsync(2)  at  most once every <ms> milliseconds. This will
              recuce disk activity and improve speed at the cost of safety.  A
              power   failure   could  result  in  the  loss  of  up  to  <ms>
              milliseconds of history.

              A <ms> value of 0 will cause beanstalkd to call fsync every time
              it writes to the binlog.

              This option has no effect without the -b option.

       -F     Never  call fsync(2) function. This is like -f with a <ms> value
              of infinity.

              This option has no effect without the -b option.

       -h     Show the command line help and summary of options.

       -l <addr>
              Listen on address <addr> (default is 0.0.0.0)

       -p <port>
              Listen on TCP port <port> (default is 11300).

       -s <bytes>
              The maximum size in bytes of each binlog file.

              This option has no effect without the -b option.

       -u <user>
              Become the user <user> and its primary group.

       -z <bytes>
              The maximum size in bytes of a job.

参考: http://manpages.ubuntu.com/manpages/lucid/man1/beanstalkd.1.html