Civ on a ram drive

civvver

Deity
Joined
Apr 24, 2007
Messages
5,855
Not really sure where to post this, but does anyone use Dimmdrive? It's a ram drive but it's built specifically for steam games so supposed to be very easy to use. One of my biggest gripes about civ5 is how long the game takes to simply load up (I sit at the load screen for a couple mins) and load saved games. I'd probably play a lot more if it started right away, could do a couple turns and then leave it. Was just wondering if anyone has used it and could say how much faster civ5 is with it. One reviewer said turns are 5-10x faster.

http://steamcommunity.com/id/the9trances/recommended/337070/
 
[TL;DR: It might help slightly in some circumstances, but CiV is not a good contender for benefitting from a RAM drive]

One reviewer said turns are 5-10x faster.

There's a word for that, but I think it's against this forum's T&Cs :p.

So, there are some very specific circumstances in which a RAM drive is useful; this is a general overview, and might sound somewhat patronising, but I want to be sure the background is clear.

There are numerous factors that affect the performance of a process. Some of the most influential ones for games are:
* Processing power, which boils down to number of CPUs/cores, and their speed
* Disk/SSD read speed
* Disk/SSD access or seek time - for an SSD the access time doesn't change much dependent upon the distance between two pieces of data, but on a disk this is a big deal
* Disk/SSD write speed - rarely important in gaming, but can make a difference to save speed in some circumstances
* GPU processing power
* Amount of memory
* Amount of video memory
* Speed of memory - rarely of interest outside microbenchmarks
* Speed of transferring from system memory to video memory - can sometimes have a real effect, but mostly only when there's not enough video memory so it's constantly being swapped in and out

Ideally, an imaginary perfect program perfectly optimised to run on a given computer will make completely even use of all resources, so that no one aspect is waiting for any other. So, for example, let's say you're trying to load some data from disk, process it into the format that the video card wants in order to use it as a texture (if it's an image), or a mesh (if it's a model), or whatever, and send it to be displayed:

In a perfect world you would load in one chunk from the disk
then process it while loading the next chunk
then transfer to video memory while processing the next chunk and loading the next next chunk
then display it while transferring the next chunk to video memory and processing the next next chunk and loading the next next next chunk
and so on. And all this time, every part of the system would be working at 100%, with every other part finishing its current job at the exact moment that it get new work to do.

In practice, this never happens. What actually happens is that the processor issues a read request then waits...then the disk eventually reads a block of data in a big chunk (this is dramatically improved with SSDs since they don't have the extremely expensive seek times of a disk, but the access time is still never zero). Then depending on how much processing needs to be done, the disk either finishes reading the next chunk and sits around waiting for the processor to do something with it, or the processor finishes its work and sends the data to the video card, then sits around waiting for the disk to provide the next chunk. In both cases, if the amount of data the CPU can process per second is higher than the amount of data that the storage can provide per second, then the storage becomes the bottleneck and the rest of the process is waiting for it. With a disk, the data rate is highly dependent upon whether each read follows directly after the next or requires a seek to another part of the disk - it might get, say, 90MB/s for reading large chunks of sequential data, or maybe a thousandth of that if they're small requests that go back and forth all over the disk. For an SSD the sequential rate might be several times that, but the random rate will be far, far higher. (Note that some people simplify by saying that it doesn't matter at all whether it's random or sequential; this isn't strictly accurate, but the slowdown is so much less than in the case of a disk that it's close enough in many practical scenarios.)

I've focussed on the aspect of loading from storage, as this is obviously the bottleneck that's addressed by the use of a RAM drive. Ultimately, if you can't reduce the amount of data you need to load, then you can really only do one thing: do everything you can to ensure that all accesses are sequential in order to get the best possible performance from the hardware. One way to do this as a program author is to optimise your resource loading to grab big chunks of data in order. If you don't have any control over the program's design though, there's really only one option: preload all of that data sequentially in big chunks, and store it somewhere that access times are so small as to be inconsequential - ie. main memory - then use that to satisfy any requests from the application, rather than having to go back to the disk. Also, if you keep that data around rather than discarding it as soon as the request has been made, then you will be able to respond immediately to any future requests for the same data.

Your operating system does this for you, to an extent: when a request is made from a storage device it will typically start reading somewhat further ahead than it was asked, in the (usually correct) assumption that that's what will be requested next. The effect of this is particularly pronounced on a disk as reading a little bit more from the same place is practically free compared to seeking to another part of the disk. Furthermore, as long as there is memory free, the OS will store a cached copy of whatever data it think is most important - which might be measured based on recency or frequency of access.

Using a RAM drive is an attempt to tailor this behaviour to your exact needs: you know that you're about to be running a game, so you manually preload all of its data into memory, without waiting for the game to do it, then you use that to satisfy the game's requests. Hence, if the game spends more time waiting for data to load from storage than actually doing anything with it, and if it's loading it in a suboptimal manner that can be improved by first preloading it sequentially, and if you have enough memory to dedicate to the task of storing the preloaded copy without it having to resort to the disk anyway, and if that leaves enough memory free for the game to get all it wanted, then you might see a measurable performance improvement.

You can get a vague idea of what the effect might be fairly easily: time how long it takes to start the game and load a save, then close the game and repeat the process. For bonus points, repeat a few times. What will happen is that the game loads all of its data, then if you have enough free memory for the OS to think it's worthwhile it will save that data in memory ready for the next time. Repeating the process is just in case the OS decides the first time that it wasn't important enough to keep compared to whatever you have cached already, in which case accessing it repeatedly acts as a hint that it's more likely to be needed in the future.

If the effect is a distinctly improved loading time, then you know that the storage was the bottleneck the first time, and thus you might get a benefit from using a RAM drive.

In my case, it makes no difference, and if I monitor my system while CiV is loading then I can see that there's always at least one CPU core pegged while the rest of the system is largely idle, and the average storage queue length (ie. the number of outstanding unsatisfied requests at any given time) is well below 1, thus the game while loading is CPU-bound almost all of the time and it makes no difference how fast my storage is. This might be different for you if you have a very fast CPU but a very slow storage device (I have an i5-3570k and a blazing fast SSD), but I have a hard time believing that it will be much different unless your system is seriously unbalanced.

If you do decide to give it a go (and bear in mind that you might have other games that are likely to get more of a benefit) and you find that I'm wrong about this in practice, then I would very much like to hear about it as it might indicate that I should investigate better ways of monitoring the loading process.
 
I got a Ramdisk from radeon on a discount and i`ve yet to use it. I`ve installed it, but not put any game on it yet. I would like to put Civ 5 on it too, but because of Steam won`t you be forced to put every other game that you might have activated in there too?

Also, I had a situation where Steam accused me of pirating my game, wouldn`t let me play, then after awhile said I was ok (I hate that treating me like a crim when I`m not.) I think Steam was complaining about the Ramdisk since that was the only change I`d made to my PC.

If that`s the case, be careful, Steam might shut down your games and accuse you of being a pirate if you try to use it with it.
 
Well, I'm hardly a computer architect, only know the basics that I learned at my Fakultet, most applications that should run much faster on a multi-core CPU with enough RAM and video memory to make NASA blush don't run as fast as you'd want/expect because of the way they were written and the way the CPU handles instructions from its set (controlled by the OS). I'm going to assume that will be less of an issue with time as multi-cores are the **** now

Basically what was made to be good at most things is unlikely to be really good at one or a few particular things
 
Do you have an SSD operating system drive? this would fix the load times quite a bit. Using a RAM drive would be doable you would need quite the amount of memory to get one that fits Civ plus still maintain enough memory to run the game well enough to make it worth it. You'd probably be better off with an SSD that way the entire computer benefits from it and the load times would be better than a traditional HDD drive.
 
Civ V (& BE) appear to be particularly poor candidates for Ram Drive.

1. The Civ V graphics engine needs a lot of main memory & graphics memory while running

2. The way the code is coded has the bulk of the work on a main thread so the OS doesn't get the opportunity to offload a signficant portion of the work from the processor running at 100% onto the idle processors.

3. It appears that about the only time it's accessing the hard drive are:

A. On starting up Civ V. (That RAM drive program would move this startup time to starting up the drive)

B. Loading / saving the game along with starting a new one. (I'm thinking this directory isn't one that RAM drive program would try to mount)

C. Changing the background songs. (this less than a second though on my Windows 7 laptop)

D. Completing a world wonder. (This also appears to take less than a second on my Windows 7 laptop)

E. If the machine doesn't have enough physical RAM, then whenever your main memory gets too full and the OS swaps out part of the memory to the hard drive (virtual memory). Note that if this occurs while running a RAM Drive, then the OS will move part of the RAM Drive to VM (back to the hard drive.)

The best candidates for a RAM drive would be a program that frequently wants to access the hard drive but the entire content it needs won't make a dent on the Physical memory. (Because it was written for when physical RAM people had was a lot less than it is today)
 
I would like to put Civ 5 on it too, but because of Steam won`t you be forced to put every other game that you might have activated in there too?
No, you can perfectly create several Steam Libraries. And choose which game to put where.
 
@waywocket: thanks for the breakdown. That info is great for those of us who aren't hardcore IT but enjoy knowing what's going on with the machine.

To OP, this might sound like it's not enough of a haxorz, but the single biggest performance jump I got in the game was switching on "single player quick movement". This cut my turn time (waiting for the AIs turn) by at least 70%. (This is common knowledge on the forum, but thanks to joncnunn for giving me the tip originally.). Changing this setting tells the cpu not to animate all the units on the map during the turn ending. It takes a few turns subsequent to get used to. I'm not sure on this, but I believe there is an animation call from the code for units that aren't even visible to the player. I can't account for the serious lag in any other way. In any case, give it a shot if you're having trouble in-game. As far as initial load time, you've got me. I just boot the game and go get a cup of coffee. :)
 
Ok thanks guys. My harddrive is my bottleneck which is why I ask. I've got an older core i5 but it's still fast, a i5-760 oc'd to 3.6 ghz, I have a newer card r9-270, I just got more ram so I have 12 gb ddr3 now which is why I asked. But my harddrive is still a regular 7200 rpm 2TB. Because I generally don't mind waiting for games to load and ssd's main benefit for regular users is reduced application load times and boot times.

For me I just boot my computer as I'm walking by it and I don't mind waiting a couple seconds for chrome to open and most games load reasonably fast or in the case of multiplayer games like dota2 your load times don't matter anyway because you're always waiting for the slowest of the bunch to load in the end.

The only game that seems excessively long to start up is civ5. I mean it's minutes. Like several. Then loading the save. Civ series is such a great pick up for 5 minutes game for me to get a few turns in but not if getting to my save takes 5-10 mins.

However even before checking back here there's two major reasons I don't think the dimmdrive would help. First it might launch civ5 way quicker but you have to preload it onto the dimmdrive anyway. I haven't gotten any answers on how long this takes but I'm assuming it's comparable to civ5 startup time. So what's the point then? If I'm going to leave it on the ramdrive then I might as well just leave my pc on with civ5 on anyway.

The second issue was someone said it doesn't cache your saves so that time is still long. So wtf does it do lol. I can't really figure it out but some people are making huge claims that it is a dramatic improvement. I could see it more for a game like skyrim when you enter buildings and stuff but my pc loads those fast enough for my tastes anyway. Oh well.

Nice discussion, thanks to all involved.
 
Spoiler :
Ok thanks guys. My harddrive is my bottleneck which is why I ask. I've got an older core i5 but it's still fast, a i5-760 oc'd to 3.6 ghz, I have a newer card r9-270, I just got more ram so I have 12 gb ddr3 now which is why I asked. But my harddrive is still a regular 7200 rpm 2TB. Because I generally don't mind waiting for games to load and ssd's main benefit for regular users is reduced application load times and boot times.

For me I just boot my computer as I'm walking by it and I don't mind waiting a couple seconds for chrome to open and most games load reasonably fast or in the case of multiplayer games like dota2 your load times don't matter anyway because you're always waiting for the slowest of the bunch to load in the end.

The only game that seems excessively long to start up is civ5. I mean it's minutes. Like several. Then loading the save. Civ series is such a great pick up for 5 minutes game for me to get a few turns in but not if getting to my save takes 5-10 mins.

However even before checking back here there's two major reasons I don't think the dimmdrive would help. First it might launch civ5 way quicker but you have to preload it onto the dimmdrive anyway. I haven't gotten any answers on how long this takes but I'm assuming it's comparable to civ5 startup time. So what's the point then? If I'm going to leave it on the ramdrive then I might as well just leave my pc on with civ5 on anyway.

The second issue was someone said it doesn't cache your saves so that time is still long. So wtf does it do lol. I can't really figure it out but some people are making huge claims that it is a dramatic improvement. I could see it more for a game like skyrim when you enter buildings and stuff but my pc loads those fast enough for my tastes anyway. Oh well.

Nice discussion, thanks to all involved.
You are really gimping your computer using an HDD system drive for sure. It's almost criminal how slow they are with new computers. It is the single biggest obvious improvement you could make.
Ram drives are awesome for benchmark tests but real world testing it just doesn't make a big enough difference. With the money you already spent on the computer just spend $70 and get a 120GB SSD and you will never go back to HDD system drives.....ever. The speed difference of every day use and well every system functions is just so much faster.
 
The only game that seems excessively long to start up is civ5. I mean it's minutes. Like several. Then loading the save. Civ series is such a great pick up for 5 minutes game for me to get a few turns in but not if getting to my save takes 5-10 mins.

True, but it`s not alone. Have you tried a Total war game like Shogun 2? This also takes a ridiculously long time to start, especially if I`m offline. I often wonder what the heck the program is doing to take so long. I have bigger modern games that take way less time.
 
Caveat, I am really only considering this is in the context of a laptop, where two drives is not really an option. That said, managing multiple drives is a PITA on a desktop too.

...But my harddrive is still a regular 7200 rpm 2TB.

With the money you already spent on the computer just spend $70 and get a 120GB SSD and you will never go back to HDD system drives.....ever.

The main problem is going from 2TB to 128GB. The SSD just don’t provide enough space (yet). If you want, say, 512GB that is like a $300 premium (in a new laptop).
 
You are really gimping your computer using an HDD system drive for sure. It's almost criminal how slow they are with new computers. It is the single biggest obvious improvement you could make.
Ram drives are awesome for benchmark tests but real world testing it just doesn't make a big enough difference. With the money you already spent on the computer just spend $70 and get a 120GB SSD and you will never go back to HDD system drives.....ever. The speed difference of every day use and well every system functions is just so much faster.

My pc is over 4 years old. At the time ssd's were far too expensive and now I have so much stuff loaded it would be a huge pain to move the os around. I mean I know it can be done but I don't want to bother. I'll prob build a new pc in 2-3 years, maybe 1tb ssd's will be the norm by then!
 
I used Steam Mover to put only Civ 5 on my SSD and it's a lot faster now. My computer is also pretty old, but most SSDs come with a tool to move the OS to them. It was a bit more complicated to move the folder for the program files to another hard drive but there good instructions on the net.

It's worth it. :)
 
My pc is over 4 years old. At the time ssd's were far too expensive and now I have so much stuff loaded it would be a huge pain to move the os around. I mean I know it can be done but I don't want to bother. I'll prob build a new pc in 2-3 years, maybe 1tb ssd's will be the norm by then!

1tb SSDs are coming in. They are about £300 right now. Still too expensive but certainly should be easy to buy in 2-3 years.
 
The main problem is going from 2TB to 128GB. The SSD just don’t provide enough space (yet). If you want, say, 512GB that is like a $300 premium (in a new laptop).

My pc is over 4 years old. At the time ssd's were far too expensive and now I have so much stuff loaded it would be a huge pain to move the os around. I mean I know it can be done but I don't want to bother. I'll prob build a new pc in 2-3 years, maybe 1tb ssd's will be the norm by then!

My computer is the same age (i7-920) and I bought one of those SSDs $200 for an 80GB...it's actually still the OS drive.

I just load the operating system essential programs and a game on an SSD and everything else goes on storage driver.

It's the perfect time to start fresh and just move the old drive to a storage only drive and keep everything on it. I learn long ago to not keep anything but essentials on the OS drive. Makes it so much easier to recover from a crash or a drive failure. Windows can even be setup to use the storage drive for the My Documents and all user library items.
 
Caveat, I am really only considering this is in the context of a laptop, where two drives is not really an option. That said, managing multiple drives is a PITA on a desktop too.

The main problem is going from 2TB to 128GB. The SSD just don’t provide enough space (yet). If you want, say, 512GB that is like a $300 premium (in a new laptop).

An internal cd/dvd drive on a laptop is nearly idiotic any more, so if you have a laptop that's got that, replace it with a secondary hdd or ssd, then get an external cd/dvd/blueray drive for reasonably cheap ($20-$40 for cd/dvd). You'll probably get way more out of that secondary drive than the cd/dvd drive.

And managing 2 hard drives is just a bit of disipline, and it makes fixing things if they break easier. Have the OS and frequently used programs on the ssd have everything else on the hdd, if you drop the laptop and the hdd goes dead you don't have to replace the whole darn thing. Heck, if the ssd dies, you have most of your extras on the secondary drive, and can re-attach them to the os with minimal work when you get a new one installed.

I've had a 128GB SSD, and 2 - 2TB HDD's on my desktop forever: OS, LoL, & CiV on the SSD (used to have WoW on there too, but it's a monster of an install); Everything else across the two HDDs. If managing multiple drives is the problem (figuring out where to put things). Hardlink folders from your HDD's to your C:\ folder structure or do a virtual extension of the C:\ drive in hardware management.
 
It's not managing the drives, it's being too lazy to want to port the os over. And the prices keep dropping. I see 256gb drives for around $150 now. Saw a 1tb drive on sale on newegg today for $380 25% off.
 
Top Bottom