Saturday, December 14, 2013

Performance Tweak: Moving Battlefield 4 to an SSD

The recent Origin sale afforded me the opportunity get a good deal on Battlefield 4; £29.99 for the Standard Edition instead of the usual £44.99 (if you missed that, I've noticed that it's even cheaper on Amazon currently). I was excited about the new version of the game, but I'd held off buying at launch because I'd been really getting into Arma 2 co-op multiplayer. However, since buying the game I have to say I've been completely hooked; managing to play for a few hours every day.

I did have one shock when I started playing the game though: how long each map takes to load. Each time I started a new round, I was faced with a wait of a good few minutes before I could get into the action, which often meant I was one of the last players to spawn. This was a big change from Battlefield 3, which despite taking a while to load still took a fraction of the time. After a couple of days with the game I made two interesting observations:

  • Even if I was playing on a server with no map rotation (i.e. the same map would be used for each round), I could still expect extremely long loading times. I'm assuming this is because the amount of destruction that can be wrought over the course of a round, so restoring the map to it's initial state involves simply reloading the entire map.
  • During the time the map was being loaded, the HDD activity LED on my machine was lit solidly and the system would be sluggish if I tried to perform any other tasks while waiting. This indicated to me that the loading process was very I/O intensive and perhaps the mechanical drive was a severe bottleneck.

I have an SSD in my system, but up until now it's only been used as the boot drive; I hadn't gotten around to installing any games on the device. It seemed as though Battlefield 4 would be the first game that would push me to do so. For a while, I had been aware of a trick using file system symbolic links to allow a subset of your Steam library to run off an SSD. This was something that was no longer necessary after Valve developed a feature for the Steam client itself to allow custom install paths for games. However, Battlefield 4 is an Origin game, so that wasn't an option and I decided to attempt the symbolic link method to run the game off my SSD. Fortunately, while doing some research, I found a post that suggested the trick would work just as well for Origin as it had done for Steam.

The steps I took were:

  1. Exited the Origin application.
  2. Copied my entire Battlefield 4 installation (D:\Electronic Arts\Origin_Games\Battlefield 4) to the SSD (C:\EA_Games\Battlefield 4).
  3. Moved the old Battlefield 4 directory (essentially just renaming it), so I could quickly roll back if the process didn't work.
  4. Ran Command Prompt as an admin user and typed the following command:

    mklink /d "D:\Electronic Arts\Origin_Games\Battlefield 4" "c:\EA_Games\Battlefield 4"

  5. Fired up Origin again and launched the game.

After this, I was extremely pleased to find that the maps loaded much quicker than before. In fact, it feels like it brought waiting time back down to what I used to experience with Battlefield 3; mission accomplished! Now while loading the HDD activity LED is lit intermittently, which seems to suggest that disk I/O is no longer the bottleneck. I suspect now the only way to improve loading times would be to upgrade other components in the system (most likely the CPU).