primocache fails to cache multiboxing application

FAQ, getting help, user experience about PrimoCache
Post Reply
matthewh0798
Level 2
Level 2
Posts: 5
Joined: Sun Oct 18, 2020 1:52 am

primocache fails to cache multiboxing application

Post by matthewh0798 »

I run a program that allows multiple instances/multiboxing of an application by by killing the mutex of the application and enabling -shareArchive, so that multiple clients can be launched simultaneously. This program is on my hdd as well as the application.

If I run the application itself while cached, it works perfectly fine, but running the program that mutliboxes cached will immediately cause an application crash. I first paused the cache, and both programs worked, so i then reset and resumed the cahce, and the same scenario of the application working by the multiboxing of the application causing the crash happened.

I don't believe the multiboxing program is at fault since it works outside of primocache, but does not inside primocache. I have temporarily moved it to my ssd as a solution to launch the app that is on the hdd (which is being cached by an l2 ssd cache btw).

Is there any reason as to why primocache can not cache a program that kills mutex and enables -shareArchive on an application?

Edit:
Also didn't know whether or not to report this as a bug since i don't know if primocache is supposed to cache mutex killing applications or not.
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: primocache fails to cache multiboxing application

Post by Support »

An interesting problem! Theoretically, PrimoCache only process disk read and write requests. If the multiboxing program itself or applications can run with cache, this means that there is no errors on reading these applications. It seems that multiboxing program might do some special process directly on disks, causing this kind of conflicts. May I know the name of multiboxing program?
InquiringMind
Level SS
Level SS
Posts: 477
Joined: Wed Oct 06, 2010 11:10 pm

Re: primocache fails to cache multiboxing application

Post by InquiringMind »

Support wrote: Tue Jan 05, 2021 3:27 am ...May I know the name of multiboxing program?
Multiboxing seems to be almost exclusively used for running multiple instances of MMORPG clients and the -sharearchive parameter seems only to arise with Guild Wars 2 - so the poster may be using something like Healix.

Killing mutexes in general is a bad idea. While some programs may use them just to detect or prevent multiple instances, they are often used for process co-ordination, data synchronisation and resource allocation. Even if a program continues running, disabling its mutex could result in data corruption or process deadlock.

However for a MMORPG, you may consider the benefits to outweigh the potential risks.

In this case, I would guess (only the developer, ArenaNet, could say for sure) that GW2 has a "mutex fallback" creating a file to hold critical synchronisation data, and having this cached is resulting in its crashing. Windows does cache files normally, but applications can stop this via the FILE_FLAG_NO_BUFFERING flag - this however does not stop PrimoCache from caching the file.

Aside from running GW2 from a non-(Primo) cached volume, you may be able to work around this by identifying the file(s) concerned and creating a symbolic link to locate it on another non-(Primo) cached volume. Consider using Link Shell Extension (LSE) for this.

(Edit: An easier option may be to find the folder used for configuration data (for GW2 this would be %appdata%/Guild Wars 2/) and moving that to another volume, using LSE to create a junction point in the original location. That way, the bulk of GW2 would still benefit from PrimoCaching).
User avatar
Support
Support Team
Support Team
Posts: 3623
Joined: Sun Dec 21, 2008 2:42 am

Re: primocache fails to cache multiboxing application

Post by Support »

@InquiringMind, according to the description from matthewh0798, the problem can be resolved by moving the multiboxing program outside of caching, though target applications still can be cached. So we guess the multiboxing program has some special process, not target applications.
InquiringMind
Level SS
Level SS
Posts: 477
Joined: Wed Oct 06, 2010 11:10 pm

Re: primocache fails to cache multiboxing application

Post by InquiringMind »

Support wrote: Thu Jan 07, 2021 10:14 am @InquiringMind, according to the description from matthewh0798, the problem can be resolved by moving the multiboxing program outside of caching, though target applications still can be cached. So we guess the multiboxing program has some special process, not target applications.
Good point - I missed that. In which case it may be the multiboxing application writing to a file to track application activity (maybe using it as a substitute for the mutex?). In that case, it could be relying on OS-level file locking which should still work on a Primo-cached volume, but the improved performance (and shorter duration of any locks) might be a factor.

Matthewh0798, are you using any L1 caching, and if so, might disabling that make any difference?
matthewh0798
Level 2
Level 2
Posts: 5
Joined: Sun Oct 18, 2020 1:52 am

Re: primocache fails to cache multiboxing application

Post by matthewh0798 »

@InquiringMind Sorry for the late reply, no I am not using any L1 caching, and the program i am using is actually in fact gw2launcher by healix as linked above.
Post Reply