Jump to content
VanilleKeks

[Guide] Reduce Stutters And Eliminate Freezes + [Discussion]

Recommended Posts

Posted (edited)

Hello,

 

I am posting this here because I do not only want to post this guide, but also start a discussion about any other fixes that the average APB player might not know. First of all:

 

This fix is not my creation. It was shown to me by a person named Secrets, you might have seen them on the APB Community Discord.

 

[Information]

 

What are we doing?

 

We are going to use some of our RAM to create a virtual hard drive (A RAM Disk) and link APB's Asset Cache to that hard drive with a CMD command (symlink). 

RAM Disks can be a lot faster than even an SSD (depending on age)  and allow us to bypass some of the OS level issues that APB has.

 

I don't want to go into too much detail, just know that this is perfectly safe to use. Google is your friend if you feel unsure. Keywords: RAM Disk, Symlink

 

What can this do?

 

- The amount of stutters when ingame might be significantly reduced.

- The game might no longer freeze and/or otherwise lock itself, ever.

 

Important Info:

 

- Results will depend on how fast your RAM is.

- A minimum of 4GB RAM (for the virtual hard drive) is recommended for the average APB Session (You can lower this, but you will get a out of memory crashes. 

- You will have to redo the process when you restart your PC. It takes about 30 seconds once you get used to the inputs.

- Once you have set it up, you just launch APB normally.

- If you have a newer SSD this might not give you any benefit or even worsen your performance. Players with older Drives benefit a lot more from this.

 

 

[Guide]

 

EDIT: There is an error in the original video, here is the remaster that actually works:

 

 

 

 

 

 

[Discussion]

 

Do you have any "unorthodox" fixes that might yield results and you wanna share?

Edited by VanilleKeks
  • Like 3
  • Thanks 2

Share this post


Link to post
Share on other sites
Posted (edited)

I've looked into this in the past but to my experience the RAM disk only provides a real benefit if you're limited to either:

- Sata SSDs,

- HDDs,

In some cases it may even worsen performance. The stutters come from a Garbage Collection dump moment which you can find in the logs file as well as how long it took. - these are entirely memory dependent as it clears out objects in the game to make room for new ones.

 

Example:

 

 


    Line 105252: 12:23:31 - DevGarbage: 78.952200 ms for realtime GC
    Line 110230: 12:25:31 - DevGarbage: 78.478200 ms for realtime GC
    Line 111186: 12:27:31 - DevGarbage: 77.942700 ms for realtime GC
    Line 117401: 12:29:32 - DevGarbage: 77.687400 ms for realtime GC
    Line 120265: 12:30:14 - DevGarbage: 94.592900 ms for realtime GC
    Line 204050: 12:30:19 - DevGarbage: 72.723000 ms for realtime GC
    Line 205658: 12:30:21 - DevGarbage: 88.738700 ms for realtime GC
    Line 289360: 12:30:28 - DevGarbage: 74.733000 ms for realtime GC
    Line 289815: 12:30:28 - DevGarbage: 74.445500 ms for realtime GC
    Line 299754: 12:32:28 - DevGarbage: 81.947600 ms for realtime GC
 

 

This is a good metric to see if your stutters increased or decreased while attempting this.

 

But by no means would I discourage anyone from trying it out and see if it works for them. I am interested in hearing results.

Edited by KyoukiDotExe

Share this post


Link to post
Share on other sites
Posted (edited)

Saw this before, I guess I'll try it out now. I'll edit this and post results later.

 

also this might be useful (if you set it as Z)

Quote

mklink /d "Z:\Cache" "C:\Program Files (x86)\Steam\steamapps\common\APB Reloaded\APBGame\AssetCache"

 

EDIT: Alright so I tried it out and I think I can say it somewhat helps. Felt like there were less stutters and when they did happen, they weren't big, long stutters that I sometimes get. I did notice more of a difference when I played offstream though, but that's probably because of my poor setup. Anyway, I would definitely recommend trying this out since there's no reason not to.

Edited by koIaman
  • Thanks 1

Share this post


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

Hello,

 

I am posting this here because I do not only want to post this guide, but also start a discussion about any other fixes that the average APB player might not know. First of all:

 

This fix is not my creation. It was shown to me by a person named Secrets, you might have seen them on the APB Community Discord.

 

[Information]

 

What are we doing?

 

We are going to use some of our RAM to create a virtual hard drive (A RAM Disk) and link APB's Asset Cache to that hard drive with a CMD command (symlink). 

RAM Disks are a lot faster than even an SSD and allow us to bypass some of the OS level issues that APB has.

 

I don't want to go into too much detail, just know that this is perfectly safe to use. Google is your friend if you feel unsure. Keywords: RAM Disk, Symlink

 

What will this do?

 

- The amount of stutters when ingame will be significantly reduced.

- The game will no longer freeze and/or otherwise lock itself, ever.

 

Important Info:

 

- Results will depend on how fast your RAM is.

- A minimum of 4GB RAM (for the virtual hard drive) is recommended for the average APB Session (You can lower this, but you will get a out of memory crash sooner. Wiith 4GB I can play for 10 hours with no crash)

- You will have to redo the process when you restart your PC. It takes about 30 seconds once you get used to the inputs.

- Once you have set it up, you just launch APB normally.

 

 

[Guide]

 

- Install ImDIsk Toolkit from preferred source (It's a virtual disk driver)

- Do what I do in this video:

 

And that's it, you're done.

 

[Discussion]

 

I have been using this for several weeks now and the difference is very noticable. I have had very little stutters and 0 gamelocks so far.

It is definitely worth the 5 minutes of effort.

 

Do you have any "unorthodox" fixes that you wanna share?

8GB ram, i7 3770, GTX1050ti...on windows 7 64bit...80-100 fps...whats your specs? If anything this could be a big help with is the new call of duty battle royale(WARZONE)for 97GB file size. Hell to run that game with my specs for what i thought I had future proof system.🤔 I can run Bf3 and 4 Ultra at 1080p Max with over 60 -100 fps. I managed to get war zone stable with 60fps lock using page file extension, bit NVIDIA 3d settings sweet spot and some config file With 8GBRAM and Win7. I really don't understand how APB can run bad for you, Maybe you should watch warzone performance fix videos and apply it to APB. For a game that requires 16GB RAM WIN 10 64bit. I'm not straying off topic about another game just to let you know.

Share this post


Link to post
Share on other sites
Posted (edited)
5 minutes ago, locknloadzz said:

8GB ram, i7 3770, GTX1050ti...on windows 7 64bit...80-100 fps...whats your specs? If anything this could be a big help with is the new call of duty battle royale(WARZONE)for 97GB file size. Hell to run that game with my specs for what i thought I had future proof system.🤔 I can run Bf3 and 4 Ultra at 1080p Max with over 60 -100 fps. I managed to get war zone stable with 60fps lock using page file extension, bit NVIDIA 3d settings sweet spot and some config file With 8GBRAM and Win7. I really don't understand how APB can run bad for you, Maybe you should watch warzone performance fix videos and apply it to APB. For a game that requires 16GB RAM WIN 10 64bit. I'm not straying off topic about another game just to let you know.

My Specs are:

Ryzen 9 3900x

RTX 2070 SUPER OC

16Gb 3200Mhz

 

The Stutters in APB are related to your drives. I hit 144FPS consistenly in APB but there are still stutters, because those are unrelated to overall performance. 

Edited by VanilleKeks

Share this post


Link to post
Share on other sites
5 minutes ago, VanilleKeks said:

My Specs are:

Ryzen 9 3900x

RTX 2070 SUPER OC

16Gb 3200Mhz

 

The Stutters in APB are related to your drives. I hit 144FPS consistenly in APB but there are still stutters, because those are unrelated to overall performance. 

Holy that is a future proof system..until Warzone 2 comes out 😅

Share this post


Link to post
Share on other sites

Just to add to this: there is a program to help with the folder linking. Link Shell Extension. I originally got it for APB years ago, but continue to use it pretty frequently. It adds the symbolic linking process to the context menu, super easy!

Share this post


Link to post
Share on other sites

It does not fix the main stuttering issue which is the garbage collection system clearing unused RAM.

 

Share this post


Link to post
Share on other sites
3 hours ago, SquirrelFace said:

It does not fix the main stuttering issue which is the garbage collection system clearing unused RAM.

 

It can't prevent them and there is no fix for something that is hardcoded into the game. It does however make the dumps a lot quicker and therefore less noticeable. In my experience, significantly less noticeable.

Share this post


Link to post
Share on other sites

Yeah, you can't fool me in to letting you hack in to my PC.

 

Nice try.

Share this post


Link to post
Share on other sites
7 hours ago, SquirrelFace said:

It does not fix the main stuttering issue which is the garbage collection system clearing unused RAM.

 

That and APB underusing avaliable RAM and cores.

All of this shit should be fixed with engine update. Should...

 

I try it out some time later.

Share this post


Link to post
Share on other sites
14 hours ago, KyoukiDotExe said:

I've looked into this in the past but to my experience the RAM disk only provides a real benefit if you're limited to either:

- Sata SSDs,

- HDDs,

In some cases it may even worsen performance. The stutters come from a Garbage Collection dump moment which you can find in the logs file as well as how long it took. - these are entirely memory dependent as it clears out objects in the game to make room for new ones.

 

Example:

  Reveal hidden contents

 


    Line 105252: 12:23:31 - DevGarbage: 78.952200 ms for realtime GC
    Line 110230: 12:25:31 - DevGarbage: 78.478200 ms for realtime GC
    Line 111186: 12:27:31 - DevGarbage: 77.942700 ms for realtime GC
    Line 117401: 12:29:32 - DevGarbage: 77.687400 ms for realtime GC
    Line 120265: 12:30:14 - DevGarbage: 94.592900 ms for realtime GC
    Line 204050: 12:30:19 - DevGarbage: 72.723000 ms for realtime GC
    Line 205658: 12:30:21 - DevGarbage: 88.738700 ms for realtime GC
    Line 289360: 12:30:28 - DevGarbage: 74.733000 ms for realtime GC
    Line 289815: 12:30:28 - DevGarbage: 74.445500 ms for realtime GC
    Line 299754: 12:32:28 - DevGarbage: 81.947600 ms for realtime GC
 

 

This is a good metric to see if your stutters increased or decreased while attempting this.

 

But by no means would I discourage anyone from trying it out and see if it works for them. I am interested in hearing results.

this.

Share this post


Link to post
Share on other sites
Posted (edited)
On 4/28/2020 at 9:58 PM, VanilleKeks said:

stuff

Looks nice, though it sems you wrote the mklink command the other way around in the video. It should be

mklink /d "usual location" "new location" This way the "new location" is linked to the original one. Doing it the way you did wouldn't use the ramdisk to store the assets at all.

Edited by heelruby
typo
  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
On 4/29/2020 at 2:30 PM, Artorius_ said:

Does this work in other games too or only APB? 

Most likely not as this tweak is meant to help APB put some assets in RAM that would otherwise go into a HDD/SSD. APB has no choice as to use the HDD/SSD because it is limited to <4GB RAM due to being a 32 bit application. Most other games are either 64 bits already or don't have issues with the 4GB limit to begin with, if they are older games.

 

For those asking whether this will eliminate every stutter, garbage collection stutters are (as has been said already) not affected by this, but unfortunately GC is only one of the multiple causes of stutters. I have collected some GC times to prove this. On all 4 runs, I logged into the same character, went to social and idled a bit in front of the clothes shop to cause the maximum possible disk load:

 

Spinner/ HDD without ramdisk
	Line 6645: 13:43:38 - DevGarbage: 71.101600 ms for realtime GC
	Line 6914: 13:43:59 - DevGarbage: 57.993300 ms for realtime GC
	Line 9494: 13:45:02 - DevGarbage: 71.593300 ms for realtime GC
	Line 11535: 13:45:07 - DevGarbage: 61.530200 ms for realtime GC
	Line 11970: 13:45:07 - DevGarbage: 60.692800 ms for realtime GC
	Line 19820: 13:47:07 - DevGarbage: 68.735400 ms for realtime GC
HDD plus ramdisk
	Line 6645: 14:15:57 - DevGarbage: 70.825400 ms for realtime GC
	Line 6914: 14:16:14 - DevGarbage: 58.260500 ms for realtime GC
	Line 9429: 14:17:16 - DevGarbage: 71.052600 ms for realtime GC
	Line 11313: 14:17:20 - DevGarbage: 60.997500 ms for realtime GC
	Line 11748: 14:17:20 - DevGarbage: 59.838800 ms for realtime GC
	Line 17087: 14:19:20 - DevGarbage: 64.772400 ms for realtime GC	
NVMe drive without ramdisk
	Line 6645: 13:54:22 - DevGarbage: 72.887600 ms for realtime GC
	Line 6905: 13:54:30 - DevGarbage: 59.166000 ms for realtime GC
	Line 9476: 13:55:38 - DevGarbage: 72.855800 ms for realtime GC
	Line 11541: 13:55:43 - DevGarbage: 61.931400 ms for realtime GC
	Line 11988: 13:55:43 - DevGarbage: 60.429500 ms for realtime GC
	Line 19900: 13:57:43 - DevGarbage: 67.482200 ms for realtime GC
NVMe plus ramdisk
	Line 6645: 14:02:13 - DevGarbage: 70.539800 ms for realtime GC
	Line 6904: 14:02:19 - DevGarbage: 58.487600 ms for realtime GC
	Line 9232: 14:03:09 - DevGarbage: 70.705000 ms for realtime GC
	Line 11278: 14:03:11 - DevGarbage: 60.021700 ms for realtime GC
	Line 11713: 14:03:11 - DevGarbage: 59.999700 ms for realtime GC
	Line 18967: 14:05:12 - DevGarbage: 67.676100 ms for realtime GC

Relevant specs: i9 9900k @ 4.9Ghz, 2x8GB DDR4 3800-CL16, Samsung 970 EVO Plus 500GB NVMe drive, a "desperately slow" 5400rpm Seagate 2TB HDD and Windows LTSC 2019 (version 1809).

 

These values reflect that GC is done in RAM,  so all configurations perform mostly the same within a small margin of error. Notably, GC times are not worsened by using the RAM disk despite the higher amount of reads/writes to RAM.

 

As for HDD/SSD access, the game just crams everything into the AssetCache folder ("everything" being mostly other players' models and cars) until either:

 

- The game is closed and contents of AssetCache are cleared.

- Disk space runs out, causing the game to crash.

 

That means that there is no GC being done periodically, unlike with main RAM, as the game simply assumes that storage space won't run out.

 

GC times aside, even though I did not measure framerates, the "HDD without ramdisk" setup created some very noticeable irregular stutters whenever characters loaded in, plus it also took longer for characters to load. Using a RAM disk greatly improved framerate stability even when the game's install remained on the spinning HDD.

 

The performance difference between a high-end SSD and a RAM drive is minimal to nonexistent, but using a RAM disk will also reduce wear on SSDs and prolong their usable life.

 

So therefore I strongly recommend this tweak to anyone using a spinning HDD or a pre-2014 SSD who has enough RAM at their disposal.  The RAM drive can be set as dynamically allocated so memory is freed up again once the game closes. Of course, this will not be necessary when the new engine arrives as it will be able to use as much RAM as it needs, being a 64 bit executable.

Edited by mojical
  • Like 2

Share this post


Link to post
Share on other sites
2 minutes ago, VanilleKeks said:

If you do it that way you get an error:

Simply delete the original folder in the APB files before running the command. It should look like this :

HxvqIBl.png

Notice that little arrow saying this is just a shortcut to the actual folder which should be in the Z drive. You can even check it in its properties :

j3FwOZf.png

6 minutes ago, VanilleKeks said:

You can also literally see the Z: Drive (aka the RAM disk) filling up with asset cache in my video.

You will still be able to see them in both folders, as one is just a shortcut of the other. Though in your case you will be seeing this while in-game :

bMcxgfG.png

It should remain empty while doing it the other way around, I got mine to fill up at around 5 GB after just a few minutes in a filled up Social District.

Share this post


Link to post
Share on other sites
Posted (edited)
3 minutes ago, heelruby said:

-

I see I stand corrected, will add that to the OP

Edited by VanilleKeks
  • Like 1

Share this post


Link to post
Share on other sites
Posted (edited)
30 minutes ago, heelruby said:

- -

It doesn't work for me if I delete the folder. My game doesn't cache anything at all and just crashes after about 3 minutes. Any tips?

 

Edit:;

Figured it out, you have to create the folder you want it linked to first, it doesn't create the target on its own, which makes sense. Gonna update the video now.

Edited by VanilleKeks
  • Like 1

Share this post


Link to post
Share on other sites
7 minutes ago, VanilleKeks said:

It doesn't work for me if I delete the folder. My game doesn't cache anything at all and just crashes after about 3 minutes. Any tips?

 

Edit:;

Figured it out, you have to create the folder you want it linked to first, it doesn't create the target on its own, which makes sense. Gonna update the video now.

Yep, forgot to include that detail sorry

Share this post


Link to post
Share on other sites

i did the first steps of the first video and it worked good for me. placebo effect?

 

 

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.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...