![]() |
![]() HP OpenVMS Systemsask the wizard |
![]() |
The Question is: We are receiving the following error when attempting to do sort commands with files above 43,000 blocks. We have and AlphaServer with 256MB of system memory. The process still completes but we get errors. What setting is causing this error? %SORT-W-SYSERROR, system service error -LIB-F-INSVIRMEM, insufficient virtual memory Thanks for any help. The Answer is : Please first try the command HELP/MESSAGE INSVIRMEM. Then please check the record attributes of the file. If this is a STREAM_LF file with a LRL (longest record length) of 32767, you may need to CONVERT the file to another format prior to sorting. Otherwise, this is probably exactly as it says, "insufficient virtual memory". The virtual memory available to the process is comprised of both working set limits (WSQUOTA and WSEXTENT) and PGFLQUOTA. The sum of these must be "large enough" to sort your file. It is difficult to estimate in advance, but you would expect that four times the total size of the file should be sufficient. So, a PGFLQUOTA of at least 160000 blocks would probably be adequate for the task. The other possibility is that the WSEXTENT of the process exceeds the PGFLQUOTA. Normally you would not expect this type of tuning as it implies a process with access to more primary memory than secondary. Since OpenVMS V6.0, AUTOGEN will, by default, set PQL_MWSEXTENT to WSMAX. On OpenVMS/Alpha, by default, AUTOGEN sets WSMAX to one quarter of physical memory, in your case 64MB, or ~128000 pagelets. Now, since PQL_MWSEXTENT is the MINIMUM WSEXTENT for any process on your system, all processes will be granted that quota, regardless of the value in the UAF. In order to optimize performance, SORT checks the WSEXTENT and assumes it will be able to utilize that amount of memory. Provided there is adequete memory available at the beginning of the operation, the allocation request will be granted and SORT will proceed to perform a highly efficient in-memory sort. Note that in all likelyhood, the process will be over its WSQUOTA. If there demands on memory from other processes during the SORT, the SORT process will be required to return some memory. Those returned pages will need to be written to the page file. If PGFLQUOTA is too small to accomodate the returned pages, an INSVIRMEM error will be returned. SORT will then "fall back" to using work files to complete the sort. In most cases the sort operation will complete correctly, but the error will still be reported. To determine if this is your problem execute the following DCL commands: $ WRITE SYS$OUTPUT "WSEXTENT ",F$GETJPI("","WSEXTENT") $ WRITE SYS$OUTPUT "PGFLQUOTA ",F$GETJPI("","PGFLQUOTA") If the PGFLQUOTA value is lower than WSEXTENT, you should increase PGFLQUOTA, or decrease the WSEXTENT (or, more likely, PQL_MWSEXTENT). Note that unless you are extremely short of disk space, the most reasonable option is to increase PGFLQUOTA (here's a nickel kid, buy yourself another 100MB!) For a process performing sorts on large files, (or even moderate sized file like your 43,000 block example) a WSEXTENT of 128,000 blocks is reasonable. The PGFLQUOTA should probably be 500,000 or more (but no more than half the physical page file size). Do the math -- disks are cheap. 500,000 blocks is only 250MB. People now often use disk drives that small as paper weights, as they're not worth using up the slot in the SCSI chain. Is it really wise to limit the performance of your Alpha system for want of a few hundred dollars investment in disk space? For a 256MB OpenVMS Alpha system, the OpenVMS Wizard would expect to see a minimum of a one gigabyte pagefile, or better, double that. Making sure you have more than enough page file space is a very cheap way to prevent potential performance problems, or, in extreme cases, system hangs or crashes. Once you have adequate pagefile space, make sure your processes have sufficient PGFLQUOTA to use as much as they need.
|