This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Increase default pipe buffer size on VMS to 8192 on 64-bit systems.
authorCraig A. Berry <craigberry@mac.com>
Wed, 6 Jan 2010 04:06:03 +0000 (22:06 -0600)
committerCraig A. Berry <craigberry@mac.com>
Wed, 6 Jan 2010 04:06:03 +0000 (22:06 -0600)
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).

pod/perlvms.pod
vms/vms.c

index dc56071..17175db 100644 (file)
@@ -348,15 +348,14 @@ argument to the C<system> 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.
index c3af096..45bfe21 100644 (file)
--- 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