Jump to content
Sign in to follow this  
Sophiie

The RAMDisk Guide: Have a slow hard drive? Here's how to fix your framerate issues.

Recommended Posts

Hey guys,

I'd like to present a pretty helpful guide today. This guide is aimed at people with 7200 RPM HDDs, and to highlight the importance of solid state drives.
I would also like to mention that this guide is very limited to those with 8GB RAM or higher.
Anything you do to your computer in this guide is at your own risk. I, nor Little Orbit, are responsible for any damage you do to your computer by misconfiguring or altering your PC.

The RAMDisk Guide

I'd like to preface this guide with a little Q&A.

What's a RAMDisk?
A RAMDisk is an optional piece of software that converts RAM on your computer to virtual disk space, and allows RAM to be used as temporary, ephemeral storage that is reset upon your computer restarting.

Why even do that? Isn't the whole point of installing something to use it on your computer permanently?
Not exactly. You will want anything that's already loaded into memory and not time sensitive on the main drive. Yes, some HDDs and SSDs are quick for some operations. Some applications will use the hard drive as temporary storage, however. In the case of APB, there's a lot of disk read/writes going on, and most of it is due to the asset cache.

What IS an asset cache for?
APB uses an asset cache to store temporary textures each time the game is ran. The asset cache stores information about clothing and serialized customization data that gets streamed in through the technology Realtime Worlds had created. It's basically an Unreal 3 extension that required a significant rewrite of the codebase to pull off. Technically speaking, it's impressive that they were able to push Unreal so far.

Unfortunately for us, that data all gets written and read from the hard drive. This can lead to long-term health problems for the hard drive, and not only that, but it's terribly inefficient. Concessions had to be made with the technology available at the time, plus for general market availability, RTW had to consider that most players would use low-end PCs.

Why does APB: Reloaded use an asset cache?
When APB was being developed, the game engine ("Unreal 3") was already pushed to its limits. APB: Reloaded is distributed as a 32-bit application, and as such, has a lower memory ceiling. In the year of 2010 when ~4GB RAM was the norm, it was simply unfeasible to:
1) Make a confusing 64-bit application versus 32-bit application choice for end-users.
2) Not all PCs would have more than 4GB RAM.
3) Consider compatibility issues and 'edge cases' between architectures that would arise.

Developers at the time were scared of that 4GB limit. They'd already push the engine to its limits with the districts they had, and also had intense memory leak issues.

APB was marketed as a high-end PC title with stunning visuals and a in-depth customization system. In order to provide those visuals - period - on any system, there had to be considerable concessions made. One of them being the asset cache.

So they opted for this option, which would save parts of the game that should have been in RAM to disk as a form of storage.

OK, I know why and how an asset cache is used. What's this RAMDisk going to do to solve it?

It's 2018 now, and we have a bit more RAM available. A quick glance at Dell's website shows even mid-range laptops having 8GB of RAM. This guide assumes you have one of those slow, 7200 RPM drives in a monstrosity that has 8GB of RAM, a i3 @ 2.6ghz and a dedicated GPU minimum. The GPU doesn't even have to be good, as long as it's not on the same board. If you have an onboard GPU, there's really nothing you can do to prevent lag - Unreal 3 is notoriously bad with integrated Intel cards for example.

A RAMDisk does exactly what it says it does. For those that don't know what RAM is, it's 'Random Access Memory' - it is memory that can be accessed at any point and wiped in the same manner that it is created. Applications reserve a portion of this memory when they are allocated, and can 'ask for more' if they need it. A RAMDisk makes your RAM into a hard drive, essentially. You can allocate any amount of RAM for this virtual drive, however, we'll cover that later.

By putting the asset cache on RAM, you effectively reduce the impact it has on actual gameplay.
APB constantly has framerate issues, notably little 'spikes' when players enter the district. After you've been in a district and have established most of the data, you typically don't need to load it again. So the longer you're in the same district with the same people, the less impacted you are by these spikes. Of course, a new player could enter the district and freeze the rendering thread by simply spawning next to you at any point. So that's where the RAMDisk comes in... by effectively reducing the wait time on the disk, you are increasing your framerate as the game spends more time doing other tasks and does now not have to wait for that task to complete.

Great! How do I get started?
Here's the actual guide portion of the guide:

Download and install ImDisk:
http://www.ltr-data.se/opencode.html/#ImDisk

Next, open the GUI version of ImDisk from the 'Classic' Control Panel. You can get there on Windows 10 by typing 'Control Panel' into search, and then navigating to 'ImDisk'.

CLcOjaW.png
zLR3sO4.png

Once in ImDisk, go to File -> Mount new virtual disk...

QvvQIQP.png

Select the following options in the prompt that appears. The drive number can be anything, but you *MUST* remember it later.

MEmhPiY.png

A prompt will appear to format your drive. Select the following options for your RAMDisk drive. If you have 16 GB of RAM or more, you may consider a 9.5GB RAMDisk and just moving the whole APB folder onto the RAMDisk.

Mu2LXxw.png


**IF YOU HAVE LESS THAN 16GB OF RAM FOLLOW THE STEPS IN QUOTES**

Quote


Next, we'll have to set up a symbolic link to the drive that we just made. Open up a windows command prompt as Administrator by typing 'cmd' into Windows Search and right clicking it to run as an Administrator.

QDt11qn.png

Let's say your APB: Reloaded game folder is at "C:\Program Files\Steam\steamapps\common\APB Reloaded", as it is for most folks.

Navigate to this folder with the Windows Explorer GUI. Delete the folder located at C:\Program Files\Steam\steamapps\common\APB Reloaded\APBGame\AssetCache" - we'll remake it here in a moment.

Type the following into your command line:
mklink /d "C:\Program Files\Steam\steamapps\common\APB Reloaded\APBGame\AssetCache" "X:\"

 

And that's it! You should be able to start APB: Reloaded now and play the game. Please note that APB: Reloaded won't start unless the RAMDisk is allocated and created, so remember to do that (or set ImDisk up to do that automatically, though that should be its own guide.

How do I undo this?
If you wish to get rid of the symbolic link and go back to sluggish FPS, there's a way to do that too:
Delete the C:\Program Files\Steam\steamapps\common\APB Reloaded\APBGame\AssetCache folder in your APB: Reloaded game folder and restart the game.

A word to the developers:
It's 2018. Can we PLEASE have the option for a RAM-based asset cache instead of a disk-based one , somewhere on the lifecycle of the game? It is something I'd like you guys to prioritize in development with the engine upgrade. Something like GNU's mmap but for the asset cache. It's long overdue, but I understand Reloaded had other priorities at the time. Little Orbit, if you want to do something that will impact new user retention greatly, this would be it.
  • Like 5

Share this post


Link to post
Share on other sites
7 hours ago, Sophiie said:
How do I undo this?
If you wish to get rid of the symbolic link and go back to sluggish FPS, there's a way to do that too:
Delete the C:\Program Files\Steam\steamapps\common\APB Reloaded\APBGame\AssetCache folder in your APB: Reloaded game folder and restart the game.
The only thing that has been done so far is the automatic emptying of the AssetCache folder.
 
7 hours ago, Sophiie said:

It's 2018 now, and we have a bit more RAM available. A quick glance at Dell's website shows even mid-range laptops having 8GB of RAM. This guide assumes you have one of those slow, 7200 RPM drives in a monstrosity that has 8GB of RAM, a i3 @ 2.6ghz and a dedicated GPU minimum. The GPU doesn't even have to be good, as long as it's not on the same board. If you have an onboard GPU, there's really nothing you can do to prevent lag - Unreal 3 is notoriously bad with integrated Intel cards for example.


I have a better laptop, but with a 5400 rpm disk.I have a better laptop, but with a 5400 rpm disk. The guide is useless to me. So it remains to wait for the game to be 64 bits. In my opinion, it will not happen sooner than on the new version of the engine. Until they complete the transition to 3.5, probably LO will not deal with such technical issues.

Share this post


Link to post
Share on other sites
5 hours ago, lgawe1994 said:
The only thing that has been done so far is the automatic emptying of the AssetCache folder.
 
I have a better laptop, but with a 5400 rpm disk.I have a better laptop, but with a 5400 rpm disk. The guide is useless to me. So it remains to wait for the game to be 64 bits. In my opinion, it will not happen sooner than on the new version of the engine. Until they complete the transition to 3.5, probably LO will not deal with such technical issues.

The game will automatically empty the AssetCache folder. I'm not sure what you mean by that.

If you have a 5400 RPM disk, but have 8GB of ram (or more), this guide is not useless to you. RAM is going to be faster than your disk. Edited by Sophiie

Share this post


Link to post
Share on other sites

I've been doing this for quite a while (using a batch file to create the symlinks automatically every time I launch the game) and I would recommend it to anyone with 16+ GB of RAM. While it won't give higher FPS on an SSD it'll help with IO related micro freezes, and it will preserve SSDs from wear. Hard drive users should certainly feel the difference. 

However I think there's no point in asking for a RAM asset cache, since this will without a doubt be a thing in Unreal 3.5, and I don't think the developers will want to spend effort into putting band-aids onto an old engine when the new one is already nearing completion.

Also, the RamDiskUI ("C:\Program Files\ImDisk\RamDiskUIprogram" for example) that comes with ImDisk Toolkit has more features than the configuration tool shown here, including the ability to allocate the RAM disk's space dynamically. This is useful for those who play other more modern games and don't want to disable their RAM disk to meet their additional RAM requirements.
 

Edited by Lyfeld

Share this post


Link to post
Share on other sites

i followed this tutorial, but am getting this error when running the launcher...

 

System.UnauthorizedAccessException: Access to the path 'D:\STEAM\STEAMAPPS\COMMON\APB RELOADED\APBGame\AssetCache\System Volume Information' is denied.

 

 

i can see the directory path and write/read from it. i created mine using...

 

i am using AMD Radeon RAMDisk

 

mklink /d "D:\steam\steamapps\common\APB Reloaded\APBGame\AssetCache" "Z:\"
symbolic link created for D:\steam\steamapps\common\APB Reloaded\APBGame\AssetCache <<===>> Z:\

 

any ideas as to why this might be happening? i am launching it from Steam in Windows 10.

 

thank you!

Edited by uraputz

Share this post


Link to post
Share on other sites

okay... so i tried this again using the lmDisk and it is working.

 

AMD Radeon RAMDisk was the issue.

 

it is starting the update process now. very excited to see this in action!

Share this post


Link to post
Share on other sites
1 hour ago, EnriquexD said:

So, if i have 8gb ram i should create a 4gb RamDisk, right?

If it runs well, don't. If you have stuttering and low fps from poor disk performance, go ahead. 

Share this post


Link to post
Share on other sites
2 hours ago, _chain said:

If it runs well, don't. If you have stuttering and low fps from poor disk performance, go ahead. 

Nope my game was having random fps drops and i got tired of this. Tried it today and i can say it worked, thanks a lot for this guide.

 

But i have the feel with only 1,5 or 2gb in the ramdisk should be enough.. idk, i need to see the size of AssetCache after a good gaming time to see what size it is.. Testing it was something like 550mb usage in that folder.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...