Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gearmand(1p) [debian man page]

GEARMAND(1p)						User Contributed Perl Documentation					      GEARMAND(1p)

NAME
gearmand - Gearman client/worker connector. SYNOPSIS
gearmand --daemon DESCRIPTION
This is the main executable for Gearman::Server. It provides command-line configuration of port numbers, pidfiles, and daemonization. OPTIONS
--daemonize / -d Make the daemon run in the background (good for init.d scripts, bad for running under daemontools/supervise). --port=7003 / -p 7003 Set the port number, defaults to 7003. --pidfile=/some/dir/gearmand.pid Write a pidfile when starting up --debug=1 Enable debugging (currently the only debug output is when a client or worker connects). --accept=10 Number of new connections to accept each time we see a listening socket ready. This doesn't usually need to be tuned by anyone, however in dire circumstances you may need to do it quickly. --wakeup=3 Number of workers to wake up per job inserted into the queue. Zero(0) is a perfectly acceptable answer, and can be used if you don't care much about job latency. This would bank on the base idea of a worker checking in with the server every so often. Negative One (-1) indicates that all sleeping workers should be woken up. All other negative numbers will cause the server to throw exception and not start. --wakeup-delay= Time interval before waking up more workers (the value specified by --wakeup) when jobs are still in the queue. Zero(0) means go as fast as possible, but not all at the same time. Similar to -1 on --wakeup, but is more cooperative in gearmand's multitasking model. Negative One (-1) means that this event won't happe, so only the initial workers will be woken up to handle jobs in the queue. COPYRIGHT
Copyright 2005-2007, Danga Interactive You are granted a license to use it under the same terms as Perl itself. WARRANTY
This is free software. IT COMES WITHOUT WARRANTY OF ANY KIND. AUTHORS
Brad Fitzpatrick <brad@danga.com> Brad Whitaker <whitaker@danga.com> SEE ALSO
Gearman::Server Gearman::Client Gearman::Worker Gearman::Client::Async perl v5.10.1 2009-10-05 GEARMAND(1p)

Check Out this Related Man Page

Simple(3pm)						User Contributed Perl Documentation					       Simple(3pm)

NAME
Thread::Pool::Simple - A simple thread-pool implementation SYNOPSIS
use Thread::Pool::Simple; my $pool = Thread::Pool::Simple->new( min => 3, # at least 3 workers max => 5, # at most 5 workers load => 10, # increase worker if on average every worker has 10 jobs waiting init => [&init_handle, $arg1, $arg2, ...] # run before creating worker thread pre => [&pre_handle, $arg1, $arg2, ...] # run after creating worker thread do => [&do_handle, $arg1, $arg2, ...] # job handler for each worker post => [&post_handle, $arg1, $arg2, ...] # run before worker threads end passid => 1, # whether to pass the job id as the first argument to the &do_handle lifespan => 10000, # total jobs handled by each worker ); my ($id1) = $pool->add(@arg1); # call in list context my $id2 = $pool->add(@arg2); # call in scalar conetxt $pool->add(@arg3) # call in void context my @ret = $pool->remove($id1); # get result (block) my $ret = $pool->remove_nb($id2); # get result (no block) $pool->cancel($id1); # cancel the job $pool->cancel_all(); # cancel all jobs $pool->join(); # wait till all jobs are done $pool->detach(); # don't wait. DESCRIPTION
"Thread::Pool::Simple" provides a simple thread-pool implementaion without external dependencies outside core modules. Jobs can be submitted to and handled by multi-threaded `workers' managed by the pool. AUTHOR
Jianyuan Wu, <jwu@cpan.org> COPYRIGHT AND LICENSE
Copyright 2007 by Jianyuan Wu This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2010-10-04 Simple(3pm)
Man Page