Ramdisk

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

shockwave95

New Member
Jul 29, 2019
50
0
0
had a curious thought, is it possible to have the mod pack run in a ramdisk to get an insane amount of speed?
 

zemerick

New Member
Jul 29, 2019
667
0
1
It pretty much doesn't touch your HD, so not really.

CPU is usually the limiter.

I can't tell a diff from an old 7200rpm drive and a new high end SSD.
 

Evil Hamster

New Member
Jul 29, 2019
768
0
0
I was getting some really bad lag in the magic pack. I followed the instructions in the tech support forum to install optifine (using version numbers for the magic pack instead of what's listed for FTB) and played for a while with no lag at all, even explored 2000 blocks in a new direction which would normally crash MC dozen times with 'out of memory' errors and didn't have a single problem.
 

shockwave95

New Member
Jul 29, 2019
50
0
0
It pretty much doesn't touch your HD, so not really.

CPU is usually the limiter.

I can't tell a diff from an old 7200rpm drive and a new high end SSD.

Well that's kind of sadning, I wonder if it would be use full for a server?
 

zemerick

New Member
Jul 29, 2019
667
0
1
Well that's kind of sadning, I wonder if it would be use full for a server?

It'd have to be a pretty big server, heavy on mystcraft. Minecraft is really just tiny. REALLY tiny.

Star Wars The Old Republic was something like 15-20 gigs. My current FTB sits at 0.175 gigs. There just isn't enough for a hard drive to have a hard time loading it all.

I did think of a possible use though: Very large texture packs. If you ran a 512x512 pack, a ramdisk might help there. If you somehow got the rest of your computer to be ok with it that is:)
 

winthrowe

New Member
Jul 29, 2019
6
0
0
It'd have to be a pretty big server, heavy on mystcraft. Minecraft is really just tiny. REALLY tiny.

The server doesn't have to be that big for it to benefit from SSD or ramdisks. even though there's not a lot of data total, it needs to be written and read quickly for the server to perform well. After you get more than a few people on, the latency from the disk needing to spin starts adding up, and the hard drive is completely busy, and becomes the performance bottleneck for the server.
 

Vilmos

New Member
Jul 29, 2019
84
0
0
Minecraft benefits a LOT from a ramdisk. I have no idea why someone would claim otherwise. If you are running single player then the ramdisk on your own computer is an excellent solution to speed up disk access and since the entire map is dynamic and chunk loading/unloading is resource intensive the ramdisk increases this a great deal.

For a multiplayer experience the server needs to run a ramdisk for the benefits to be seen and that also works very well. I am currently running a server with the Beta pack and a ramdisk and chunk generation and loading are practically instant. As the player count and the map size increases the speed is even more apparent.

To be clear the part you want on ramdisk is just the world, the server files aren't necessary, but the map has constant I/O access which is the point of using a ramdisk.
 

simon48xbox

New Member
Jul 29, 2019
77
0
0
I was getting some really bad lag in the magic pack. I followed the instructions in the tech support forum to install optifine (using version numbers for the magic pack instead of what's listed for FTB) and played for a while with no lag at all, even explored 2000 blocks in a new direction which would normally crash MC dozen times with 'out of memory' errors and didn't have a single problem.
How much RAM do you have allocated in the launcher settings? This could help a lot if you set it to ~3GB (if you have enough RAM, you probably what to leave at least 2.5GB for your OS).
 

zemerick

New Member
Jul 29, 2019
667
0
1
Minecraft benefits a LOT from a ramdisk. I have no idea why someone would claim otherwise. If you are running single player then the ramdisk on your own computer is an excellent solution to speed up disk access and since the entire map is dynamic and chunk loading/unloading is resource intensive the ramdisk increases this a great deal.

For a multiplayer experience the server needs to run a ramdisk for the benefits to be seen and that also works very well. I am currently running a server with the Beta pack and a ramdisk and chunk generation and loading are practically instant. As the player count and the map size increases the speed is even more apparent.

To be clear the part you want on ramdisk is just the world, the server files aren't necessary, but the map has constant I/O access which is the point of using a ramdisk.

Well, I said that, because it is exactly what I see. I just checked real quick, with server and client on the same computer the total drive access peaked at a tiny 125 KB/s, combined read/write across everything for MC, from logs, java, the works. Response of 0-1ms. By comparison game load passed 1.4 megs/s. I forgot the response time.

This was during creation of a Mystcraft age, which requires the new generation of over 100 chunks.

CPU however, running 3.2 ghz was maxing out on 2 cores.

I'm not saying a ramdisk would never help, just that in my experience it would be a huge waste. It'd almost never be the limiting factor.

Now, something I have realized that I had not thought about before: Essentially all of the disk access is write. For a SSD this can be bad, as this is the main factor in the life of the drive. Still, it is incredibly tiny amounts, so for now it'll probably just stay.

I might try out a ramdisk some time to see if it changes some other dynamics that might cause a performance increase.

CAVEAT: Just remembered some people play on laptops, and laptops still for some stupid reason often have 5,400 RPM drives. These people might see a substantial performance increase with ramdisk.
 

Vilmos

New Member
Jul 29, 2019
84
0
0
If you are on a top end gaming computer on single player, then no it won't make a noticable difference.

However the ramdisk is faster than all other drives by an order of magnitude since it is as fast as your RAM. There is the huge caveat that a power loss means the loss of your data, but both windows and Linux have ramdisk drivers with automatic backups at regular intervals. If anyone reading this decides to try out a ramdisk PLEASE make sure you are having backups written to a folder on a physical drive. Either in the windows driver or rsync with linux (or something better if you find it).

The true usefulness of the ramdisk with Minecraft is you can get an old PC put whatever flavour of linux you like on it and host the world on a ramdisk and there is absolutely no chunk loading/unloading lag for any number of simultaneous users until your CPU melts.

There are still the CPU bottlenecks for a server, but the ramdisk stops the massive I/O spiking lag that is so common when a dozen people are exploring different areas.
 

MasterMax

New Member
Jul 29, 2019
2
0
0
I am running ftb on a ramdisk in arch linux. i am using this script: it saves the content of the ramdisk every 60 seconds...
1 #!/bin/bash
2 sudo mount -t tmpfs -o size=500M none /home/max/ramdisk
3 sudo chmod 777 /home/max/ramdisk
4 cp -r /home/max/usbstick/FTB/* /home/max/ramdisk
5 while true
6 do
7 sudo rsync -av --partial --delete /home/max/ramdisk/* /home/max/usbstick/FTB
8 echo"press any key after playing"
9 read -t 60 -n 1 && break
10 done
11 sudo rsync -av --partial --delete /home/max/ramdisk/* /home/max/usbstick/FTB
12 sudo umount /home/max/ramdisk
13 echo"done..."
 
  • Like
Reactions: Poppycocks

Bigglesworth

New Member
Jul 29, 2019
1,072
0
1
Putting the game on a RAMDrive causes far more risk than the 1-2% very limited performance improvements here and there. Even a top of the line CPU has plenty of work to do fed by a 50MBps hard drive. The best you will see is a slightly quicker launch time. This will not give you higher framerate. This will not lower your latency. This will not magically make mods run faster.

In the end all you are doing is

1. Wasting RAM
2. Setting your Minecraft saves up for corruption
3. Taxing your CPU and hard drives by doing ridiculously short backups that will hinder game performance far more than a Ramdrive would ever home to have helped in the first place.
 

DZCreeper

New Member
Jul 29, 2019
1,469
0
1


Ever heard of chunk loading? SDD's in Raid 0 can't touch the performance of a Ramdisk in this area.

Waste of memory? When someone has 8 gigs of it or more there aren't a lot of better uses for it.

Save corruption hey? Its called rsync every 10 minutes. Worst case scenario you lose 10 minutes of play time to the void.

Quicker launch times? Not even close, in fact starting and stopping a client or server will take much longer because the file need to be copied to and from memory before you can play. The gains are worth it.
 

Poppycocks

New Member
Jul 29, 2019
1,914
0
0
Looks like this discussion is theoretical dislikers versus practical users.

I know where my money's at.
 

Mjw

New Member
Jul 29, 2019
390
0
0
so how would i go about setting up a ramdisk? and how would i back it up/sync it to ssd/hdd?
 

Omicron

New Member
Jul 29, 2019
2,974
0
0
Generally, disk access time is a distant fifth for Minecraft as far as performance bottlenecks go, after CPU, JVM, garbage collector configuration and allocated memory. You need to have those addressed and eliminated before you'll see noticable gains with optimizing disk access.

Out of curiosity I ran a test after I finished building my new PC last weekend. Running both a client and a dedicated server, I did not notice a difference between my SSD and a RAMdisk (and with desktop Haswell on the job, there were definitely no CPU bottlenecks involved).

Mind you, I don't have a mechanical disk in that machine at all; there may potentially be an at least measurable difference if you're stuck on one of those. If you don't have an SSD and no money to buy one, a RAMdisk might be an option in that case. I'll also mention that I only had me and two other people on the server at the time, and we weren't exploring new chunks (though we were spread out over three different areas). Busy servers might tell other stories, I wouldn't know.

However, as a server operator I would not use a RAMdisk unless performance without it would be completely untenable. The risk of losing your current world status on a simple power hiccup should weigh much heavier than any perceived performance difference (and increasing the frequency of runtime backups will simply eliminate any performance advantage you may have gained). You're responsible for preserving your player's work and providing a stable service, not jury-rigging something you read about on the internet. Clientside/SSP only is fair game, of course, but don't say nobody warned you.

And then there's the fact that 1 GB of generic RAM will set you back about 5 €, whereas 1 GB of SSD space costs you under 0.6 € nowadays. And unless you have at least 8 GB of memory in your system, you're better off giving that RAM to Minecraft directly instead of making a RAMdisk from it, especially if your system has high CPU utilization.
 

PoisonWolf

New Member
Jul 29, 2019
300
0
0
Putting the game on a RAMDrive causes far more risk than the 1-2% very limited performance improvements here and there. Even a top of the line CPU has plenty of work to do fed by a 50MBps hard drive. The best you will see is a slightly quicker launch time. This will not give you higher framerate. This will not lower your latency. This will not magically make mods run faster.

In the end all you are doing is

1. Wasting RAM
2. Setting your Minecraft saves up for corruption
3. Taxing your CPU and hard drives by doing ridiculously short backups that will hinder game performance far more than a Ramdrive would ever home to have helped in the first place.


1) And you're saving RAM for....what exactly? Running 150 tabs on Chrome? Unused ram is the true wasted RAM.
2) I have been running my minecraft server on a ramdisk now for a year and a half, across vanilla servers and recently to FTB with no issue whatsoever. My scripts reboot the server daily, and I have up to a week's worth of backups, allowing for game reversals, if needed (including the usual hourly backups). Not one of my saves have been corrupted thus far.
3) Try using a gravisuite chest plate and fly in a straight line with boost on a server that's on a ramdisk vs. the same server that's not on a ramdisk and you tell me what the difference is. The I/O loading on RAMdisks makes a huge difference, much more than the alleged "1-2%" limited improvements.

Even client side, playing FTB on a ramdisk actually improved sustained FPS on a small Celeron laptop. Now, I am unsure why this happens, but the ramdisk actually has sustained higher FPS than my Sammy 830 SSD in the laptop. I don't know why this happens, but that's what the FPS numbers are telling me. If you know why, I'd love to hear it in order to learn more. The only inference, relative to your statements, that I can make is that it doesn't use as much CPU cycles as you're saying it does.