3

Our application deals with large files, say 2Gb, and accepted wisdom is users need RAM 10X dataset size. Developers have well-specced machines but some users see horrible performance which we attribute to their much lower RAM, but can't categorically prove or measure.

Is there a way on Windows, Linux, Mac to 'hide' RAM from the OS without turning it off. Ideally at run-time i.e. not BIOS? Or even a utility which will gobble a requested amount of RAM and prevent other apps using it?

Our application also makes heavy GPU demands via OpenGL which makes VMs a tricky option. I know that Parallels and VirtualBox simply don't support the OpenGL version we use, others might but are sometimes pricey.

Mr. Boy
  • 5,554

3 Answers3

3

There is.

On Linux, use the kernel command line parameter mem=. Add this option to the kernel command line in GRUB. Reference.

Windows has the /BURNMEMORY and /TRUNCATEMEMORY boot switches. Use bcdedit to add these switches or Reference. On Windows Vista and 7, F10 gets you into a pre-boot screen where you could add it for just that session, not sure how that works with Windows 10. Use BCDEdit option if not available. Another reference.

LawrenceC
  • 75,182
1

Deduct some available memory by creating a ramdrive, which will not impose the additional CPU cycle burden of a VM.

Ramdrives, or ramdisks, are discussed herein for Windows, Linux, and MacOS.

For Windows, one Open Source app is ImDisk, but there are many other choices.

Linux includes tmpfs but you have multiple other options here as well, such as the use of mem as a command-line option in the kernel, as noted in comments below by Austin Hemmelgarn.

For MacOS, you don't even need to create the ramdisk to obligate the memory; instead, as per the aforementioned link, do

hdiutil attach -nomount ram://1165430 /dev/disk4
K7AAY
  • 9,725
-1

Another idea: You can configure a virtual machine with whatever amount of RAM you want and run the app in there to see how it behaves.

Hefewe1zen
  • 1,862