NTFS Junction Point from HDD to SSD, will it cause performance bottleneck? (steam game relocation)

13

4

Can an NTFS Junction Point between HDDs cause a bottleneck? Or will the junction be cached in memory?

Specifically, I want to install Steam on a magnetic HDD. This means all the games will be installed there. To benefit from my SSD, I will junction point the games I am actively playing from Steam's directory on the HDD to the SSD.

I was wondering if this would cause performance issue. Every time the game accesses a file, does it need to read the HDD, read the junction point, resolve the new path on the SSD, then get the true file? Or will it the OS cache this re-direction so the performance penalty is only hit the first time?

Thanks!

ddtemplar

Posted 2014-07-02T08:01:06.627

Reputation: 131

3The definition of a junction point is directly stored in the responsible MFT entry. As the MFT is cached in memory, I wouldn't expect the HDD to be accessed when working with the linked directory. – Gene – 2014-07-02T08:58:46.143

Thanks! I won't worry about it too much then, unless I start to notice odd slowdowns. – ddtemplar – 2014-07-02T22:56:21.147

2Even if the HDD did need to be accessed to read the junction point, it's tiny -- the read would be over nearly immediately, and only need to happen once as it would get cached. – Adambean – 2015-10-09T13:31:22.617

One side note: If you install the steam application on the SSD you can still change where the game is installed to inside of steam without a junction. – cybernard – 2015-10-12T00:53:32.637

Answers

5

Most likely no, it won't be bottleneck. There is some overhead associated with NTFS junctions, but in your scenario it should be negligible.

You could get rid of the overhead by physically moving the data to the SSD and not using junctions at all (which seems to be the core concern of your question to me), but I doubt you could measure the difference.

Where are the junctions stored and cached?

Junctions are type of reparse points which are all stored in $Extend\$Reparse metafile (another more famous metafile is the $MFT).

When a file or directory has a reparse point associated with it, NTFS creates an attribute named $Reparse for the reparse point. This attribute stores the reparse code and data. So that NTFS can easily locate all reparse points on a volume, a metadata file named \$Extend\$Reparse stores entries that connect the reparse point file and directory MFT entry numbers to their associated reparse point codes. NTFS sorts the entries by MFT entry number in the $R index.

source: Inside Win2K NTFS, Part 1 by Mark Russinovich

Reparse diagram

Reparse process

source: Inside Win2K NTFS, Part 1 by Mark Russinovich

There were comments that junctions are stored in MFT and that MFT is cached. Well now, when we know where the junctions are stored, I would require credible source to support the caching claim; which I couldn't find.

So I don't know, but I don't think it matters.

Is there a documented scenario when cross disk junction decreased performance?

Yes, ARF has run into issue like this. He was benchmarking batch deletion of small files, and when the operation was conducted across junction, the limiting factor was no longer IO (as expected) but the CPU. This benchmark was also discussed in detail on GitHub.

Vlastimil Ovčáčík

Posted 2014-07-02T08:01:06.627

Reputation: 1 835