Freezing and lockups when doing heavy disk I/O

FAQ, getting help, user experience about PrimoCache
Post Reply
Kushan
Level 1
Level 1
Posts: 3
Joined: Fri Apr 10, 2020 3:02 pm

Freezing and lockups when doing heavy disk I/O

Post by Kushan »

I've been using Primocache for a while, largely happy with the software except for one gripe that I just can't seem to nail down. As a cache, it works wonderfully and reading from my cache seems to work a treat, but when doing large, sustained writing I get complete system freezes and occasional lockups.

My relevant setup is as follows:

1x 4TB HDD
1x 512GB nVME drive (L2 Cache)
4GB of RAM (L1 Cache)

My OS drive is separate entirely and my system has 32GB of RAM total with plenty free.

I simply want Primocache to speed up my 4TB Mechanical drive. All that's on there are games from Steam, Origin, etc.

When I go to install a new game, especially a large one, it starts off maxing out my bandwidth but then quickly drops off as my system starts to freeze. The freezing is system wide, locking up any and all applications in use (including those not on any of the drives mentioned and Windows itself). I also notice this problem even when Steam (or similar) tries to allocate disk space pending a large install, before any downloading even starts. I've been pulling my hair out trying to figure this out, but the only consistent thing is if I pause the cache task, all the freezing and lagging goes away.

I have tinkered and tweaked with the various primocache settings available to me but I can't seem to stop this from happening. I'm unsure of how to diagnose this further. One thing I've noticed (Which may or may not be relevant) is that when I see this issue and check task manager, it seems that all my disks (including those without a cache task) are at 100% usage. Then when the system unfreezes everything takes a moment to catch up before the next freeze when every drive seems to be pegged at 100%.

I have a Threadripper 2950x and CPU usage isn't especially high for any of this.
User avatar
Jaga
Contributor
Contributor
Posts: 692
Joined: Sat Jan 25, 2014 1:11 am

Re: Freezing and lockups when doing heavy disk I/O

Post by Jaga »

You might want to disable the write cache on the L1 task, and use the L2 for write caching. It sounds like L1 cache writes are overwhelming the smaller size and then going straight to Urgent write status, which temporarily decreases the speed on all associated volumes.
User avatar
Support
Support Team
Support Team
Posts: 3627
Joined: Sun Dec 21, 2008 2:42 am

Re: Freezing and lockups when doing heavy disk I/O

Post by Support »

I agree with what Jaga said, that's the likely cause of the problem in v3.x. Another thing you may try is to reduce defer-write latency.
Kushan
Level 1
Level 1
Posts: 3
Joined: Fri Apr 10, 2020 3:02 pm

Re: Freezing and lockups when doing heavy disk I/O

Post by Kushan »

Okay, I'll give that a go and report back in a couple of days. Thanks, guys!
Kushan
Level 1
Level 1
Posts: 3
Joined: Fri Apr 10, 2020 3:02 pm

Re: Freezing and lockups when doing heavy disk I/O

Post by Kushan »

By jove, I think you've cracked it. I just installed an 80GB game with no issues at all.

I didn't realise that the behaviour would be for the system to halt while it freed up L1, I assumed it would just bypass it to L2 and then disk if either got full, but that's my misunderstanding and assumptions.
User avatar
Support
Support Team
Support Team
Posts: 3627
Joined: Sun Dec 21, 2008 2:42 am

Re: Freezing and lockups when doing heavy disk I/O

Post by Support »

In v4.x we have added an option which allows forwarding L1 deferred write-data to L2.
Post Reply