Jump to content

Vortex and SSDs


warriorpoetex

Recommended Posts

Correct me if I am wrong, but it seems that due to how Skyrim SE must be hardlinked, we are having x2 the space utilized for a mod. I tested this with SMIM ... which is a 0.99G file and was such within the Vortex Mod installed location. Then, upon enabling it ... the Skyrim SE directory went up to 13.8G from 12.8G. Now considering they both must be on the same drive, hence the SSD; it looks like SMIM will use x2 the space to make this work. Considering how SSDs generally offer less space for the buck- this may prove a very costly method. Thoughts?

Link to comment
Share on other sites

f7Ijz.jpg

 

just for visualization. the issue at hand is aliasing or rather a side effect of it - normally, you have 1 file with 1 hardlink - deleting the hardlink kills the file, and only the file takes actual space, not the hardlinks. with VO, you have 1 file and two hardlinks: delete one and the file still remains.

 

windows explorer treats hardlinks as files, which works fine if you have 1 file <-> 1 hardlink. the thing is, the file system cannot differentiate between what is the original hard link, and which one is created by VO - they're the same, just now there's two of them.

 

aliasing is a huge PITA and the reason hardlinks are sparsely employed. i'd rather not think about how you get rid of those hardlinks if the json manifest which tracks them goes corrupt. in fact i might just try it out

Link to comment
Share on other sites

 

 

aliasing is a huge PITA and the reason hardlinks are sparsely employed. i'd rather not think about how you get rid of those hardlinks if the json manifest which tracks them goes corrupt. in fact i might just try it out

 

 

If by aliasing you mean hard links they are really easy to remove in a directory structure that does not use them. Look at the link count and delete files with a count greater that one. Windows did not use to use them much but nowadays there are usually 1000s if not 10,000s of them on your machine. They are used to manage such things as dlls in the system directories.

 

EDIT: They used to use soft links but chose to change them, if I remember correctly, sometime around Windows 7. You are right, and I wish I could get many a tester to understand it, all files are hard links just some only have a count of one. The only thing wrong with your diagram is it is not 'my-hard-link' but 'my-other-path-to-the-data' on the same volume :smile: .

 

EDIT 2: Backing up your data will be fun. You need to backup your Vortex data and purge and redeploy on restore and keep a separate backup of your purged data directory unless, as expect, Vortex is clever enough to know what should be in a 'clean' Data folder. SKSE could be an issue.

Link to comment
Share on other sites

 

 

 

aliasing is a huge PITA and the reason hardlinks are sparsely employed. i'd rather not think about how you get rid of those hardlinks if the json manifest which tracks them goes corrupt. in fact i might just try it out

 

 

If by aliasing you mean hard links they are really easy to remove in a directory structure that does not use them. Look at the link count and delete files with a count greater that one. Windows did not use to use them much but nowadays there are usually 1000s if not 10,000s of them on your machine. They are used to manage such things as dlls in the system directories.

 

EDIT: They used to use soft links but chose to change them, if I remember correctly, sometime around Windows 7. You are right, and I wish I could get many a tester to understand it, all files are hard links just some only have a count of one. The only thing wrong with your diagram is it is not 'my-hard-link' but 'my-other-path-to-the-data' on the same volume :smile: .

 

EDIT 2: Backing up your data will be fun. You need to backup your Vortex data and purge and redeploy on restore and keep a separate backup of your purged data directory unless, as expect, Vortex is clever enough to know what should be in a 'clean' Data folder. SKSE could be an issue.

 

 

iirc windows takes heavy use of folder symlinks, i.e NTFS junctions.

 

also i might have borrowed the graphic from someplace else :sweat: inodes are a thing only on linux iirc

 

as for backups, i think the all the configuration is in a database someplace in %appdata%/vortex/state.v2 but not in a format i'm familiar with and not human-readable. i'll try to play aroudn with it the other day and see how VO behaves when i move it to another pc or something

 

 

If by aliasing you mean hard links they are really easy to remove in a directory structure that does not use them. Look at the link count and delete files with a count greater that one.

 

Good call - deleting refcounts >1 should work. I wonder if this is how the "Purge" functionality works. For a little experiment i went on and deleted vortex.deployment.json in /data/ but the purge seems to have worked fine, so it's not only purging an existing manifest

 

EDIT: externally hardlinked file survived the purge, so it's not only refcount checking

Edited by kamikatze13
Link to comment
Share on other sites

When you purge, Vortex will go through all file in the game directory, look at all files with a refcount > 1, go through all the files in its own mod directory, look at all with a refcount > 1 and remove the files that are in both sets (based on an file id that will be the same for hard links to the same file). This way vortex should be able to reliably remove hard links and only its own hard links as long as you don't manually mess with the mods directory.

 

The manifest is used as a fallback and also to figure out if a file was changed with an application outside vortex, it shouldn't be strictly required.

Link to comment
Share on other sites

 

 

When you purge, Vortex will go through all file in the game directory, look at all files with a refcount > 1, go through all the files in its own mod directory, look at all with a refcount > 1 and remove the files that are in both sets (based on an file id that will be the same for hard links to the same file). This way vortex should be able to reliably remove hard links and only its own hard links as long as you don't manually mess with the mods directory.

 

The manifest is used as a fallback and also to figure out if a file was changed with an application outside vortex, it shouldn't be strictly required.

 

 

 

I guessed there was more to it but that solution did not come to mind at the time of writing. I think there should be a LARGE warning to not mess with the Vortex mods file tree. I know this has been done in the past on more that one manager but there must be a better way.

 

Edit: Let the manager do the management. Provide the feedback, with reasons, on how it should manage.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...