How to get cache space freed up?

FAQ, getting help, user experience about PrimoCache
erich56
Level 4
Level 4
Posts: 24
Joined: Thu Mar 24, 2016 4:47 pm

Re: How to get cache space freed up?

Post by erich56 »

InquiringMind wrote: In other items, the space "taken up" by deleted files in the cache will be automatically reused, without the need for further intervention.
which is confirmed by my experience of the past 8-10 days. Regardless of the amount of "total write req" - total "write done" (to SSD) never exceeds around 2 %.
So, for my purposes (crunching various BOINC projects) PrimoCache has turned out being a useful tool for reducing SSD wear.

Only when it comes to a system crash, it can be somewhat bothersome to get back to the original status. I had this yesterday, when unfortunately, for what reason ever, the system froze during opening the NVIDIA-Inspector (which I use as a control tool for my 2 GPUs when crunching GPUGRID tasks).
I almost did not manage to get the VirtualBox work again (finally, only uninstalling it, plus manually deleting some files which were not uninstalled properly, and then re-installing it) which I need for ATLAS and VirtualLHC; the Windows Security Center was totally out of order, and it took some time to get Symantec End Protection work again. All in all about 2 hours, until everything was back to "normal".

But, from what I understand, in case of a crash, it could even come worse when using Primo Ramdisk instead PrimoCache.
InquiringMind
Level SS
Level SS
Posts: 477
Joined: Wed Oct 06, 2010 11:10 pm

Re: How to get cache space freed up?

Post by InquiringMind »

erich56 wrote:Only when it comes to a system crash, it can be somewhat bothersome to get back to the original status. I had this yesterday, when unfortunately, for what reason ever, the system froze during opening the NVIDIA-Inspector...All in all about 2 hours, until everything was back to "normal".
Almost certainly a result of an excessive "defer write" setting (do you still have it at "infinite"?). Try setting it to 30-60 seconds and the next time a crash occurs, wait for that time before resetting your system.
erich56 wrote:But, from what I understand, in case of a crash, it could even come worse when using Primo Ramdisk instead PrimoCache.
Not necessarily - with Primo Ramdisk you can use it on a per-folder basis (by replacing existing folders with junction points to folders on a ramdisk) whereas Primo Cache has to be set up on a per-volume basis. So with Primo Ramdisk you can limit the scope of possible data loss to specific folders - but you need to analyse your application file usage (using software like Process Monitor) to determine which folders to move across.
erich56
Level 4
Level 4
Posts: 24
Joined: Thu Mar 24, 2016 4:47 pm

Re: How to get cache space freed up?

Post by erich56 »

Yes, the "defer write" is still at "infinite", since this, from what I think, shrinks SSD writes to a minimum (as I said, it's now at approx. 2 %). However, by having it like this, the effects of a crash are at maximum - I am fully aware of this.
Would really by intresting by how much the SSD write rate would go up if I set "write defer" to 30-60 seconds, as suggested by you.

Concerning Ramdisk, being able to use it on a per-folder basis with junction points, would - that's what I guess - most probably strongly minimize any loss of system data. In fact, BOINC is the main operation running on this PC. So, I think if I move the BOINC folder to a Ramdisk, 95% of what's happening is covered. Is this assumption right, or am I missing something?
In other words - as much useful as I find PrimoCache so far, with "defer write" at "infinite" - what concerns loss/damage of system data, in my specific case I might be better of with Ramdisk. Correct?

There is only one question, but I would have to look this up in the explanations in the Ramdisk section of the homepage: what happens if by the time, the size of the BOINC folder would temporarily exceed the size of the Ramdisc? Would this make BOINC crash, or would the data which exceeds the Ramdisk size simply be written to SSD? From what I have seen so far, the size of the BOINC folder is between 12GB and 14GB, but sometimes, depending on the constellation of the projects and tasks, it temporarily grows to 16 or even 17 GB for short time. However, I definitely need 18GB "free" system RAM, so I could make the Ramdisk only 14GB.
InquiringMind
Level SS
Level SS
Posts: 477
Joined: Wed Oct 06, 2010 11:10 pm

Re: How to get cache space freed up?

Post by InquiringMind »

erich56 wrote:So, I think if I move the BOINC folder to a Ramdisk, 95% of what's happening is covered. Is this assumption right, or am I missing something?
If you are talking about the folder under Program Files, then it is very likely that data would be written elsewhere (thanks to UAC) but identifying where can be a challenge (hence the suggestion to use Process Monitor). Possible locations include under %ProgramData%, %APPDATA%, %LOCALAPPDATA% or %TEMP% (listing the environment variable names - open a Command Prompt window and type set to see what values these have on your system).
erich56 wrote:In other words - as much useful as I find PrimoCache so far, with "defer write" at "infinite" - what concerns loss/damage of system data, in my specific case I might be better of with Ramdisk. Correct?
To speed up a single application as much as possible, Primo Ramdisk is the better choice but requires more analysis and setting up (creating the ramdisk is easy, identifying the folders to move across is the hard part). Primo Cache does better at improving system performance generally. You can use both together (I do) and, with a reasonably low value for Write Defer (or disable it to minimise risk of data loss), you should rarely encounter problems.
erich56 wrote:...what happens if by the time, the size of the BOINC folder would temporarily exceed the size of the Ramdisc? Would this make BOINC crash, or would the data which exceeds the Ramdisk size simply be written to SSD?
If the ramdisk fills then further writes would encounter "disk full" errors (as would happen if an SSD or hard disk filled). What happens then depends on the application concerned (many don't seem to consider this possibility and just crash).

A hybrid disk ramdisk would help avoid this problem by allowing excess data to go onto SSD or hard disk so you could then allocate 14GB RAM to the ramdisk and allow a further 20-30GB via SSD. The downside of the hybrid disk is that it does not currently support image files (any plans to change this Romex?) so there would be data loss in the event of a system reset.

However you may find that BOINC generates less data than your figures suggest - if the initial size of the BOINC folder is 12GB and it maxes at 18GB, that would mean only 6GB of data being created. If you can identify the folder/subfolders written to, then migrating them to a smaller (say, 10GB) ramdisk with a timed-save image file might be the best option.
erich56
Level 4
Level 4
Posts: 24
Joined: Thu Mar 24, 2016 4:47 pm

Re: How to get cache space freed up?

Post by erich56 »

as far as I could find out, all the "working files" of BOINC are located in the BOINC folder in Application data. In the BOINC folder, there are 2 sub-folders, one is called "projects" and carries some 30-40% of the data, and the other one is called "slots" and carries between 60 and 70% percent of the data.

I was afraid that once a ramdisk gets filled to it's maximum, "disc full" errors will ocurr. Hence, a hybrid disk would be the solution; but with the downside of not supporting file images, it would not make sense in my case. Because I would definitely want to make an image in the case of shutdown.

Since in both BOINC-subfolders "projects" and "slots" there are further clearly idendifyable subfolders into which the VirtualBox is writing images in size between 1,6 and 2,5GB from time to time (which is the case with ATLAS@Home and VirtualLHC@Home - both these are running in a VM), I could theoretically choose exactly these subfolders for the ramdisc, and perhaps then even limit it to 11 or 12GB, leaving more system RAM.
Of course, it's clear that by going this way, more SSD writes will take place. So everything I am doing is always just a compromise.
As said before, with my Primocache setting as I have it now (14GB cache, 18GB system RAM, and "defer write" at "infinite"), almost nothing is being written to SSD; but in a case of system freeze or crash (as it happened recently), the danger of system data corruption seems to be essential.

So, I will think about what I will be doing. Many thanks anyway for all the hints and recommendations.
erich56
Level 4
Level 4
Posts: 24
Joined: Thu Mar 24, 2016 4:47 pm

Re: How to get cache space freed up?

Post by erich56 »

Well, I will have to make a decision to quit PrimoCache earlier than I thought - yesterday evening the system crashed again, due to a malfunction of a certain software. And, other than few days ago, the OS now seems to be damaged serverely, in a way that I cannot use it any more: I can't get the network to function, despite of all kinds of efforts through almost all the night.
As it seems, I'll have to reinstall the OS :-(
So, what I was afraid of anyway happened earlier than I though: having a system crash with PrimoCache running, you may be in severe trouble :-(
This is really too bad, because I had planned to temporarily switch off PrimoCache and to try out Ramdisk this morning.
InquiringMind
Level SS
Level SS
Posts: 477
Joined: Wed Oct 06, 2010 11:10 pm

Re: How to get cache space freed up?

Post by InquiringMind »

Sorry to hear about that - I've yet to run into anything serious but I didn't really experiment much with defer write (found there was minimal benefit in increasing it to 60 seconds but didn't want to push things further, so reverted to the 10 second default).

If you do an OS reinstall, consider splitting your disk into 2 partitions - a smaller one (C - around 10GB should be plenty for WinXP if you relocate the Documents and Settings folder) for Windows only and the larger one (D) for all your programs and data. Then you can run PrimoCache with whatever Defer Write settings you want on D, and the standard 10-second Defer Write (or disable it) on C to minimise the chance of future system corruption.

To relocate your Documents and Settings folder onto another drive (and give it a shorter, more manageable name like "Users" or "User Settings") follow these steps, taken from http://www.tech-recipes.com/rx/1409/mov ... e-c-drive/

Step 1
1. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\ProfileList
2. Under this key, there will be some number of profiles (usually 6), each of these which represents a user name that you will find under C:\Documents and Settings.
3. Click on each PROFILE key entry and look at the value ProfileImagePath to identify which one represents your username.
4. Inside the registry editor, using RegEdit or a clone registry editing program (I use Registrar Lite), edit this ProfileImagePath value that represents your username and CHANGE the path to where you want to move your settings to. In my case, I wanted to move my settings from C:\Documents and Settings\USERNAME to "D:\Documents and Settings\USERNAME".
5. Save this new path value in the registry editing program.
6. Now export the whole profile key that contains this value. You will be prompted for a file name to save the exported information to. Pick a location on your hard disk (not on the C drive) and export the key. When you finish the export and look at the output file, it should look something like this (note that exported filename locations inside the registry always represent a single "\" character with two "\\" characters)

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-220523388-484763869-725345543-1003]
"ProfileImagePath"="D:\\Documents and Settings\\USERNAME"
"Sid"=hex01,05,00,00,00,00,00,05,15,00,00,00,7c,eb,24,0d,dd,e8,e4,1c,07,e5,3b,\2b,eb,03,00,00
"Flags"=dword00000000
"State"=dword00000100
"CentralProfile"=""
"ProfileLoadTimeLow"=dword68b90756
"ProfileLoadTimeHigh"=dword01c5b12b
"RefCount"=dword00000001
"RunLogonScriptSync"=dword00000030
"OptimizedLogonStatus"=dword0000000b


7. Delete everything below your new path name. It should now look like this:

REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\S-1-5-21-220523388-484763869-725345543-1003]
"ProfileImagePath"="D:\\Documents and Settings\\USERNAME"


Step 2
1. Now do a full reboot (don't just logoff/on) and sign into the ADMINISTRATOR account
2. Copy C:\Documents and Settings\Username folder (including all sub-folders) to the new path location where the target users personal settings are to be saved (D:\Documents and Settings\XYZ in this example).
3. Logoff the Administrator account and back onto the User account
4. Run the registry file you previously exported to and edited with the .REG extension (right-click it and choose merge)
5. Reboot the computer again and logon to the USER account
6. Go to C:\Documents and Settings\Username and try to delete the complete folder structure
8. If Windows allows you to do this, then you have successfully transferred your settings to the new path location and all is well. Voila!
9. If Windows says that you can't delete it because it or something in it is required by the system, then you've done something wrong. Open Regedit and make sure that you have modified the correct location for the user account and that it has been correctly updated.
10. If you have the right location and it hasn't been updated, figure out why.
11. You might have to do a system restore if you've messed something up badly, so take a backup before and be prepared to do this if necessary.
12. Generally, an imaging program that can be initiated from DOS is the best way to restore everything if you run into problems.
erich56
Level 4
Level 4
Posts: 24
Joined: Thu Mar 24, 2016 4:47 pm

Re: How to get cache space freed up?

Post by erich56 »

many thanks for your thorough explanations above.

However, I finally could get the OS to run again, by a restore session I had started several times before, even in Safe Mode.
Hence, there was no need to reinstall XP and all the programs.
What I did, however, was to remove PrimoCache. With regard to the purpose I was using it - minimizing SSD writes - it would only have made sense to use "write cache infinite". And after two crashed in the past few days and the whole system almost gone, I did not dare any minute longer to turn on PrimoCache.
I might be a good tool, if used differently than I did.

So I installed Primo RamDisk and will see how this goes.

There is just one question left, re RamDisk, for which I did not see any answer anywhere: can I increase the size of the RamDisk without uninstalling and re-installing the tool? Because as it looks right now, after it's run for a few hours, I might need between 500MB and 800MB more RamDisk space.
erich56
Level 4
Level 4
Posts: 24
Joined: Thu Mar 24, 2016 4:47 pm

Re: How to get cache space freed up?

Post by erich56 »

okay, my question in the bottom of above posting is answered: Just now I detected the "View/Edit" function, which can be used to change the size of the RamDisk.
JimF
Level 4
Level 4
Posts: 36
Joined: Sun May 01, 2011 10:13 pm

Re: How to get cache space freed up?

Post by JimF »

For my work, I don't want the BOINC data to be written to the SSD if possible. And I can't keep track of how full the cache is if the old data is not deleted. The amount of CPU cycles required is beneath trivial insofar as I am concerned.
Post Reply