View Full Version : memory control

05-18-2009, 02:18 AM

Sorry for asking you again but is there any way to control the amount of virtual memory, size of the swap files, etc that a PV-WAVE script use? It
appeared that for the read/write operations of very large files, the scripts
consume more than 1GB virtual memory. One way was to control the IMAGE_READ operations, however would like to find out if there is also any
more ellegant way to impose some control over the memory usage of the whole program.

Many thanks in advance,

05-18-2009, 11:53 AM
Hi MNatcheva,
PV-WAVE does not have any constructs for controlling the amount of memory it requests from the operating system. On several operating systems there are tools available to limit the amount of memory, both physical and virtual to a given process.

On linux, take a look at the documentation for the /etc/limits file.
On Windows Server 2008 it may be possible to do this in the Windows System Resource Manager:

Take a look here for more information about the Windows System Resource Manager. (http://books.google.com/books?id=OGjO1so4MKQC&pg=RA1-PA225&lpg=RA1-PA225&dq=windows+limit+memory+amount+to+a+process&source=bl&ots=3a0UiClm_V&sig=6JDU539zo-0y7G1IA07fPqVzKD8&hl=en&ei=FKwRSrffAp6UMvL7tLcG&sa=X&oi=book_result&ct=result&resnum=9)

On other windows installations, you may have some luck with third-party memory manager solutions, but we have no experience with these and do not vouch for them working.

05-20-2009, 06:00 AM
Hi RWagner,

Thank you very much for your fast reply. We are using here Sun Solaris and I
was afraid that if we restrict the memory used by the PV-WAVE processes,
the jobs might fail. Is this the case or the PV-WAVE could work reliably
also with smaller amounts of memory - for example could we restrict the memory to be less than 250MB for the jobs processing images with size more
than 1GB?

Thanks a lot once more time!
Best regards,

05-27-2009, 10:34 AM
If you limit the process virtual memory size using the limits.conf file or ulimit and wave tries to exceed that limit wave will crash with an "Not enough memory" error. I do not see a way to limit the amount of RAM a process can request and direct the OS to use swap space instead...

The only workaround I can think of here is that this may be done by working in virtual environments (ie VMWare) that are limited to only use a specific amount of RAM. You would notice a considerable performance hit by doing this though, and the guest OS would require a good amount of memory itself.