Disk cluster size and performance.

The MSTS 1 Route Editor can be a beast to use, but it's capable of some amazing results, here you can talk with the wizards that are building some of the fantastic routes available and learn how to make your own.

Moderator: Moderators

Locked
AdamsRadial
Been on the forums for a while
Posts: 257
Joined: Mon Jun 21, 2004 1:00 pm
Location: In LSWR country
Contact:

Disk cluster size and performance.

Post by AdamsRadial »

I got tired of copying mini-routes to and from my backup box to the space on my main disk where I run them, so I stuck a Maxtor 80G IDE disk in a drive caddy and put an NTFS partition on it. When it came to the point where I could select the file cluster size, I had a thought. All of my machines have the default 4K size, which means that the smallest amount of disk space that will be allocated for a file is 4K. I had a quick look through a couple of routes, and found a lot of texture files are only 404 bytes.

So for an experiment, I chose the smallest possible cluster size of 512 bytes. The difference in folder size is amazing. Skipton-Carlisle, for instance, which as a mini-route takes up 723M, now takes up only 697M, which is just over the given size of 695M (Right-click on the folder and check the properties, they report both the total size of all files in the folder, and the space taken up on the disk).

As a further experiment, I thought I would try running the miniroute from the IDE disk, and got frame rates only 2-3 fps worse than those I get running on the SATA.

So, the burning question now is, if I reformat my SATA to use the smaller cluster size, will I get much better frame rates, or is it not an issue when loading files from disk?

Has anyone else played around with this ?
"Time waits for no man - but it sometimes stops to pick up hitchhikers"

Adrian S
User avatar
nwallace
Creator of fantasy routes that exist in his mind
Posts: 3418
Joined: Wed Dec 05, 2001 12:00 am
Location: Secret Route Builders Castle Retirement Home (Fictional Wing)
Contact:

Post by nwallace »

If the cluster size is 1Mb then to read the 1kb file in that 1MB cluster the disc has to read the whole 1Mb to get the 1kb file.

If the cluster size is 4kb and the file is 1k it needs to read all 4kb to get the file but the 3k waste is a lot less than 1023Kb

So there should be some read speed improvement.

What you also need to remember though is that if you have smaller clusters then the file that maps logical file to physical location is going to be larger esp for larger files.

Standard Grade Computing so dont' be suprised if ive forgotten enough to get it totally wrong
---------------------------------------
http://www.NiallWallace.co.uk

Pining for Windows for Workgroups 3.11
AdamsRadial
Been on the forums for a while
Posts: 257
Joined: Mon Jun 21, 2004 1:00 pm
Location: In LSWR country
Contact:

Post by AdamsRadial »

A good point of yours about the mapping file being larger. Do you know if this is read into memory and cached, or if it is re-read every time a new file is accessed?

I suspect the default 4K cluster is for users of MS Office, since a one-line Word document is over 2.5K. All of the routes I have looked at so far have large numbers of very small files.

I know the tiles are read as the train moves through the route, plus the associated shapes and textures. I assume the player train shapes are read only once and held as they aren't going to change, but everything else, AI trains etc, will be popping in and out of memory.
"Time waits for no man - but it sometimes stops to pick up hitchhikers"

Adrian S
User avatar
nwallace
Creator of fantasy routes that exist in his mind
Posts: 3418
Joined: Wed Dec 05, 2001 12:00 am
Location: Secret Route Builders Castle Retirement Home (Fictional Wing)
Contact:

Post by nwallace »

Think 4k is a saneish default really.

haven't a clue if the allocation tables are read frm disd during use or if its cahced anywhere but would presuem the latter, if not im off to swot up on physical storage and create a system that does
---------------------------------------
http://www.NiallWallace.co.uk

Pining for Windows for Workgroups 3.11
Locked

Return to “[MSTS1] Route Building”