VMware Communities
Stubaan
Contributor
Contributor

Some advice sought from the experienced: empowering my VM

Hello Fusionistas

I am working with a heavy numerical model coded in a mixture of Fortran and C++ for Windows. I have a pretty heavy-duty Mac Pro (2 x 2GHz Dual-Core Intel Xeon with 4GB of RAM), with Fusion installed to use 1 CPU and 1024MB RAM.

Based on my prior experience with Parallels and what I read when moving to Fusion, it is not recommended to overdo the RAM allocation to the VM. I don't understand why, but that is my impression (wrong?).

That being said, I need some juice to run this model because I am going to need to run it many many times, possibly thousands of many times, and under such circumstances even minor improvements can add up to substantial overall improvements.

Before I dive in blindly to mess around and risk creating far bigger headaches for myself, I was hoping someone on here may have some thoughts, or better yet advice even, that they'd be willing to share with me on this issue. Even just some fundamental explanations of what exactly the consequences are of changing these settings would help me better grasp it all and make me feel more comfortable, and competent, experimenting.

I do not have any experience testing this sort of thing and have no knowledge of the VM's underworkings or potential consequences that changes may have for either the Mac side or the Windows side, so frankly any deductions I might make from tinkering with the CPU and RAM settings I feel would be pretty amateurish. And honestly, I'm wary (and weary) - I tried messing around with Parallels in the past and wreaked utter havoc on my system.

Many thanks Smiley Happy

0 Kudos
6 Replies
admin
Immortal
Immortal

I am working with a heavy numerical model coded in a mixture of Fortran and C++ for Windows

To clear something up right away, if you're doing heavy number crunching (or other highly intensive work), your absolute best results will probably come from using Boot Camp and booting natively -- that way the hardware doesn't have to support two OSes at once and can devote more resources to your task.

Having said that, there are a number of good reasons why you'd want to trade off for the convenience of running in a virtual machine, so I'll assume one of them applies to you.

it is not recommended to overdo the RAM allocation to the VM

Correct. While a virtual machine is running, the memory you have allocated to it is not available to OS X. Keep in mind that Fusion is just another program running on OS X, and is affected by memory pressure like any other program. It doesn't matter if your virtual machine has lots of RAM if the host OS is swapping.

Without knowing anything more about your setup (which is very important), I'd guess you can probably increase to 2 vCPUs and 2 GB RAM without noticing much of an impact. The characteristics of your Fortran/C++ code are also important -- would the added resources actually help? If your code takes advantage of them, this is probably a good idea; if it won't help, better to keep them the way they are so the host has more resources.

Finally, you might want to take a look at .

Stubaan
Contributor
Contributor

Thanks very much etung

I'll give that link a thorough review!

You know, a big part of my problem is simply not knowing much about the code I'm working with. I have a pretty good understanding of how the Fortran code is structured - I know that it is old and not written to take advantage of parallel processing for instance. But I know very little about the C++ code other than it makes use of templating a lot (and slows down the Fortran model deplorably!!) How these considerations might tie into the RAM and CPU usage you were alluding to I do not know. Like I said, I'm illiterate when it comes to how the relationship between software and hardware can be optimized - I'm a PhD student so I can tell you that not knowing and understanding this stuff is driving me insane, but it's an entire field of expertise I simply have no exposure to, let alone training in.

What else about my "setup" might be useful? Is setup referring to VM settings? The model's code structure? Mac specs? All of the above? In reality I know it is all of the above, but perhaps some specs are more useful or important than others...

0 Kudos
Stubaan
Contributor
Contributor

P.S. If you are giving me secret advice in the subject line you should know that it is going so high over my head that the DEA is after it...

Smiley Wink

0 Kudos
admin
Immortal
Immortal

You know, a big part of my problem is simply not knowing much about the code I'm working with. I have a pretty good understanding of how the Fortran code is structured - I know that it is old and not written to take advantage of parallel processing for instance.

OK, that's the important part - if your code is nor parallelizable, then more (virtual) CPUs will not help.

What else about my "setup" might be useful? Is setup referring to VM settings? The model's code structure? Mac specs? All of the above? In reality I know it is all of the above, but perhaps some specs are more useful or important than others...

The biggest one is: What's going on in the background? Is Fusion the only thing running on the host, or are you running it in the background with 10 other programs? In the latter case, you would not be able to give as much memory to the guest and still have good performance. This also applies to the guest - is the simulation the only thing running in the guest, or are you doing other processing/monitoring/collection at the same time? In the latter case, you would need more resources to get good performance.

The How Much RAM section of has some tips on how to determine a good balance.

admin
Immortal
Immortal

P.S. If you are giving me secret advice in the subject line you should know that it is going so high over my head that the DEA is after it...

Sorry, I was making a joking reference to the D&D metamagic feat Empower Spell

0 Kudos
Stubaan
Contributor
Contributor

Well it varies... I have what I'm beginning to consider a self-destructive habit of multitasking...

I do try to keep the load on both the guest and host to a minimum, but if I'm running these sims live I'm generally also running a bunch of other stuff on the Mac. What I have been trying very hard to do is generate a collection of scripts that will let me run a series of sims overnight and thereby leave me the full faculties of my system to work on the results during the day.

I do have two empty DIMM slots, and 4 of the 6 filled slots have got 512MB cards in them so it is an option to consider upping the overall RAM I have quite substantially. Another consideration I intend pursuing is simply running multiple sims at the same time with each allocated to a different processor, since I don't think the code offers much room for executing one sim over multiple processors in parallel. This is something I will be looking into more thoroughly shortly - I have absolutely no experience in parallel computing or even the vaguest of notions how one might achieve this within the VM. My long-term goal is to run these sims through the High-Performance Computing Center we have here at the University of Florida, so perhaps I'll end up just skipping trying to do this myself and let the pros help me set things up for the HPC.

My half-orc wizard Orcen Wiles is about due for a new feat... maybe both he and I will feel Empowered soon.

0 Kudos