From: Craig A. Berry Date: Wed, 6 Jan 2010 04:06:03 +0000 (-0600) Subject: Increase default pipe buffer size on VMS to 8192 on 64-bit systems. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=df17c887edae24b6fb41930323837b575d27a7df;p=p5sagit%2Fp5-mst-13.2.git Increase default pipe buffer size on VMS to 8192 on 64-bit systems. As Charles Lane's piping code reaches its 10-year anniversary, it's time to bump up the default to something slightly more appropriate for modern systems. In addition to other benefits, this fixes test failures when a test script outputs a large amount of text on one line (e.g., t/re/reg_posixcc.t). --- diff --git a/pod/perlvms.pod b/pod/perlvms.pod index dc56071..17175db 100644 --- a/pod/perlvms.pod +++ b/pod/perlvms.pod @@ -348,15 +348,14 @@ argument to the C operator (see below). In this case, Perl will wait for the subprocess to complete before continuing. The mailbox (MBX) that perl can create to communicate with a pipe -defaults to a buffer size of 512. The default buffer size is -adjustable via the logical name PERL_MBX_SIZE provided that the -value falls between 128 and the SYSGEN parameter MAXBUF inclusive. -For example, to double the MBX size from the default within -a Perl program, use C<$ENV{'PERL_MBX_SIZE'} = 1024;> and then -open and use pipe constructs. An alternative would be to issue -the command: - - $ Define PERL_MBX_SIZE 1024 +defaults to a buffer size of 8192 on 64-bit systems, 512 on VAX. The +default buffer size is adjustable via the logical name PERL_MBX_SIZE +provided that the value falls between 128 and the SYSGEN parameter +MAXBUF inclusive. For example, to set the mailbox size to 32767 use +C<$ENV{'PERL_MBX_SIZE'} = 32767;> and then open and use pipe constructs. +An alternative would be to issue the command: + + $ Define PERL_MBX_SIZE 32767 before running your wide record pipe program. A larger value may improve performance at the expense of the BYTLM UAF quota. diff --git a/vms/vms.c b/vms/vms.c index c3af096..45bfe21 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -2885,7 +2885,11 @@ int test_unix_status; /* default piping mailbox size */ -#define PERL_BUFSIZ 512 +#ifdef __VAX +# define PERL_BUFSIZ 512 +#else +# define PERL_BUFSIZ 8192 +#endif static void