Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Virtual machines to increase performance?  (Read 4228 times)

MitchTheLich

  • Escaped Lunatic
    • View Profile
Virtual machines to increase performance?
« on: December 03, 2014, 04:53:20 pm »

So i have a relatively small amount of computer knowledge. I will soon have a 4 core computer with 16gb ram. Can i use virtualbox to create a virtual machine with like 14gb ram and then just run DF with it to make 1 more powerful computer? Or is that not how that works?
Logged

smeeprocket

  • Bay Watcher
  • Collectivist Socialist Feminist Freeloader
    • View Profile
Re: Virtual machines to increase performance?
« Reply #1 on: December 03, 2014, 06:01:44 pm »

DF isn't going to access more than 2gb, 4gb if you optimize it using a large address aware program if you have a 64 bit system.

Most games aren't going to access more than 4gb, tbh.

It's not that DF will use all your ram and then crash, it won't really use that much at all. It just can't access that much.

So this would probably do nothing, though a solid state drive would probably speed things up somewhat. I don't know how much tho.

Logged
Steam Name: Ratpocalypse
Transpersons and intersex persons mod for Fortress mode of DF: http://dffd.wimbli.com/file.php?id=10204

Twitch: http://www.twitch.tv/princessslaughter/

"I can't wait to throw your corpse on to a jump pad and watch it take to the air like a child's imagination."

MitchTheLich

  • Escaped Lunatic
    • View Profile
Re: Virtual machines to increase performance?
« Reply #2 on: December 03, 2014, 06:23:23 pm »

It's got a decent graphics card, invidia 980 iirc, so i am hopeful about the other games. I've never heard of the large address aware thing, any more tips/info on that?
Logged

Metalax

  • Bay Watcher
    • View Profile
    • Steam Profile
Re: Virtual machines to increase performance?
« Reply #3 on: December 03, 2014, 06:25:57 pm »

It's not really memory size that is the issue with DF slowdowns, it is the core speed of the CPU that is the limiting factor in almost every case. DF is not, to my knowledge, set up to run on multiple threads and as such is limited to running on a single core of your CPU.

You can get some improvement by messing with core affinities such that DF is the only program with access to one of the cores, but otherwise there really isn't that much you can do to improve its running on your machine without upgrading your CPU to one that has a higher individual core speed.
Logged
In the beginning was the word, and the word was "Oops!"

puke

  • Bay Watcher
    • View Profile
Re: Virtual machines to increase performance?
« Reply #4 on: December 04, 2014, 02:02:34 am »

or move all the program files to a ram disk...
Logged

utunnels

  • Bay Watcher
  • Axedwarf
    • View Profile
Re: Virtual machines to increase performance?
« Reply #5 on: December 04, 2014, 03:19:51 am »

VMs don't make things faster, usually. In fact, they are usually slower.
Logged
The troglodyte head shakes The Troglodyte around by the head, tearing apart the head's muscle!

Risen Asteshdakas, Ghostly Recruit has risen and is haunting the fortress!

mndfreeze

  • Bay Watcher
    • View Profile
Re: Virtual machines to increase performance?
« Reply #6 on: December 04, 2014, 03:37:15 am »

I have an SSD in my system at home on an i7-3820 overclocked cpu (4 cores) and 16GB of ram and an nvidia 680.  Lately I've been copying my DF save to a usb stick between work and home since work is getting slow for our year end freeze. The other day I accidentally copied my game install onto my 1TB non-ssd storage disk in my home system and the drop in performance was insane.  I didn't really think DF was hitting my drive that much but with all those thousands of tiny files it apparently does quite a bit.  So for sure install it to an SSD if you have one. 

I asked in the future of the fortress thread about the possibility of it being written to support 64 bit or multithreading and didn't get a respnose from Toady, and others who chimed in basically said 'not gunna happen' since the amount of work to rewrite and update that sort of thing would be a masssssive undertaking. 

As others have said though OP, a VM won't help nor does it really work the way you were thinking anyway.
Logged

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: Virtual machines to increase performance?
« Reply #7 on: December 04, 2014, 03:56:34 am »

DF and Hardware Performance: Random Factoids:
  • Dwarf Fortress is, in fact, multithreaded. However, all of the game is run on one thread. The other thread is the rendering code.
  • Your graphics card has somewhere between very little to no effect of DF's performance. A few hundred letters are vastly easier to draw than hundreds of thousands of polygons.
  • Because (usually) DF cannot access more than 2 Gb of RAM at any time, and (usually) doesn't use that much in the first place, the amount of RAM you have is largely irrelevant.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

Sergarr

  • Bay Watcher
  • (9) airheaded baka (9)
    • View Profile
Re: Virtual machines to increase performance?
« Reply #8 on: December 04, 2014, 05:56:21 am »

DF and Hardware Performance: Random Factoids:
  • Dwarf Fortress is, in fact, multithreaded. However, all of the game is run on one thread. The other thread is the rendering code.
  • Your graphics card has somewhere between very little to no effect of DF's performance. A few hundred letters are vastly easier to draw than hundreds of thousands of polygons.
  • Because (usually) DF cannot access more than 2 Gb of RAM at any time, and (usually) doesn't use that much in the first place, the amount of RAM you have is largely irrelevant.
I take objection to the RAM point. DF uses a LOT of RAM.
Logged
._.

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: Virtual machines to increase performance?
« Reply #9 on: December 04, 2014, 06:04:35 am »

It's running at 185MB at the moment for me. It's very likely that it's limited to 2GB if it's 32bit.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: Virtual machines to increase performance?
« Reply #10 on: December 04, 2014, 06:26:55 am »

It does depend on the size of your worlds. If you're running larger worlds (which isn't advisable in the first place because they drag down FPS) your RAM usage will increase as well. Larger embark sites have a similar effect.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: Virtual machines to increase performance?
« Reply #11 on: December 04, 2014, 06:35:12 am »

That would be consistent with my experience, since I almost always play 2x2 embarks in pocket worlds.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

arbarbonif

  • Bay Watcher
    • View Profile
Re: Virtual machines to increase performance?
« Reply #12 on: December 05, 2014, 02:00:49 pm »

I thought that RAM latency was considered a big point too.  So faster RAM helps alot.
Logged

Codyo

  • Bay Watcher
    • View Profile
Re: Virtual machines to increase performance?
« Reply #13 on: December 05, 2014, 04:37:53 pm »

It's not really memory size that is the issue with DF slowdowns, it is the core speed of the CPU that is the limiting factor in almost every case. DF is not, to my knowledge, set up to run on multiple threads and as such is limited to running on a single core of your CPU.

You can get some improvement by messing with core affinities such that DF is the only program with access to one of the cores, but otherwise there really isn't that much you can do to improve its running on your machine without upgrading your CPU to one that has a higher individual core speed.


In order to limit the dwarf fortress process to one core effectively, you're going to have to switch off that affinity for every other process. At default, the core will still be used by everything else. There may be a way to do this fast and simple, but I don't know of it.

I agree a smaller embark helps a lot. The performance in a 3x3 is massively better than 4x4.
The biggest helpers for FPS are the embark size and turning off temperature and weather. Turning off temperature will change the game a bit though, you'll lose fun features like burning\freezing to death. No rain either with weather gone.
« Last Edit: December 05, 2014, 04:45:56 pm by Codyo »
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Virtual machines to increase performance?
« Reply #14 on: December 06, 2014, 03:10:03 am »

Dwarf fortress is a 32bit application, yes.

It is also memory-bound.
http://en.wikipedia.org/wiki/Memory_bound_function

DF uses large, structured arrays of data in memory which are many "words" in size for the elements contained in them. This means that some of DF's evaluations take multiple fetch cycles to complete. 

This can be alleviated somewhat with faster CPU, but the real deal is the speed of the memory bus. The speed of the memory bus and the speed of the CPU are not the same thing, and haven't been since at least the 80s. To help get around this problem, modern CPUs contain instruction and data caches to hold frequently accessed data or program stack information so that the CPU does not have to perform nearly as many memory fetch cycles, which can cause the CPU to sit idle for many instruction op cycles while data gets fetched from memory.

http://arstechnica.com/gadgets/2002/07/caching/

The things that will really speed up DF are:
Larger cache size
Faster memory bus speed
Faster CPU speed

In that order.

Logged
Pages: [1] 2