Maximum length of a job payload?

3,099 views
Skip to first unread message

aaronpk

unread,
Feb 18, 2011, 2:07:25 AM2/18/11
to beanstalk-talk
Hi, I recently started using beanstalk, and I couldn't seem to find
the answer to this question in the docs or on this list. What is the
maximum length (if any) of a job? How much data is expected to be
included in the job? I'm considering en-queuing jobs that could
potentially have as much as 10kb of data in them.

Thanks,

Aaron

k...@xph.us

unread,
Feb 18, 2011, 8:35:23 PM2/18/11
to beansta...@googlegroups.com, aaronpk
On Thu, Feb 17, 2011 at 11:07 PM, aaronpk <aa...@parecki.com> wrote:
> What is the maximum length (if any) of a job?

Maximum job size is reported by the stats command,
documented here:

https://github.com/kr/beanstalkd/blob/v1.4.6/doc/protocol.txt#L566

Admittedly, this document isn't the most obvious place
for beanstalkd users to look.

You can control this value with option -z on the command line.
The default is somewhat arbitrary: 65,535 bytes.

kr

Rhesa Rozendaal

unread,
Feb 18, 2011, 1:58:27 PM2/18/11
to beansta...@googlegroups.com

$ beanstalkd -h
Use: beanstalkd [OPTIONS]

Options:
[snip...]
-z BYTES set the maximum job size in bytes (default is 65535)

Aaron Parecki

unread,
Feb 18, 2011, 8:48:01 PM2/18/11
to beansta...@googlegroups.com

Thanks. don't know why I didn't think to check the help in the program.

Are there many downsides to allowing larger jobs? 256k or so? Similarly, is there a performance increase by restricting the job length to something smaller like 1k or 512 bytes?

Thanks, Aaron

> --
> You received this message because you are subscribed to the Google Groups "beanstalk-talk" group.
> To post to this group, send email to beansta...@googlegroups.com.
> To unsubscribe from this group, send email to beanstalk-tal...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/beanstalk-talk?hl=en.
>

k...@xph.us

unread,
Feb 18, 2011, 8:56:38 PM2/18/11
to beansta...@googlegroups.com, Aaron Parecki
On Fri, Feb 18, 2011 at 5:48 PM, Aaron Parecki <aa...@parecki.com> wrote:
> Are there many downsides to allowing larger jobs? 256k or so? Similarly, is
> there a performance increase by restricting the job length to something
> smaller like 1k or 512 bytes?

This option doesn't affect speed at all.

Performance depends only on the actual jobs you put in the queue.
The server doesn't copy a job once it has been read from the network,
but larger jobs still take longer to receive and send.

kr

Reply all
Reply to author
Forward
0 new messages