Team Fortress 2 Forum

This is a community forum and not official technical support. — If you need official support: Contact Us

The following comments are owned by whoever posted them. We are not responsible for them in any way.

Back to Threads Reply to Thread

Fragmentation of TF2 Game Cache

This is a question just for the Mac users.

OK, background, I spend a lot of time on the Steam Powered User Forums where they constantly moan about framerates and how to improve them. I messed around with some netcode settings that caused me some serious instability. Before I knew what my problem was, during my trouble shooting hunt, I came across the advice of defragmenting my game cache.

Here's my question. Do we Mac users ever need to do that? Mine showed up 0% fragmentation (I've had the game since Haloween) but I'm wondering if this is dubious or if it really is un-fragmented because of the features built into my native OS that prevent us from needing to defrag.

Short Answer: No, it will always be 0%.

Long Answer: The Mac file system, Mac OSX Extended (journaled), is vastly superior to NTSF or FAT-32. Window's file systems get fragmented over time and can cause performance issues for your hard drive. But for UNIX file systems, UNIX is what OSX is based on, does not get fragmented. However, you will want to repair disk permissions about once a month, more though if you are using CrossOver. Go to the Tips and Tricks Tab and scroll all the way to the bottom where I wrote how to repair them.

However, the CodeWeavers team would probably have a better explanation of this than me.

Hey there, I've done a little research on this field.

The Steamapps folders resource containers (*.gcf) files are the ones under the magnifying glass here.
I'm using Ubuntu 9.10 x64_86 and the fragmentation is always 0% for me too, but they maybe in fact fragmented. The data files, not the filesystem.

The defragger inside Steam doesn't work for me. I don't know does it work for you. Mine freezes and hogs 100% CPU.

Went on and extracted HLextract to defrag them from Wine commandline, little progress.

@echo off
for %%F in (*.gcf) do "HLExtract.exe" -f -p "%%F"
pause

The thing that then suprised me was, that you can actually compile HLlib on almost any platform with GCC. *nix, Mac...

So, I had to do a little tinkering here and there, and pushed a new fork of it to github that does compile, I also updated the README for GCC Install.
The fork is located here

ilaril wrote:

The thing that then suprised me was, that you can actually compile
HLlib on almost any platform with GCC. *nix, Mac...

So, I had to do a little tinkering here and there, and pushed a new
fork of it to github that does compile, I also updated the README
for GCC Install.
The fork is located here

I recommend that you don't go tinkering with the files unless you know what you are doing. Most advocates here are really big nerds/geeks and know their way around complex stuff like this. Overall, don't worry about it. If you feel like it is required, just delete and re-download the game. Just be sure to save any screenshots and demo file (.dem)

Their are ways to get better performance and frame rate for the game. Just turn down all your graphics settings to low and find a screen resolution that works well for you. I play with 1280x800 on my MacBook Pro 17".

Their is another way to turn the graphics down way beyond the in game settings, however, everything looks washed out. If you really need me too, I'll go into further details.

I don't have any great technical details about it, but I know I've seen Steam tell me my game files were fragmented. When I've let it defrag them, it seemed to be doing real work. It made progress and eventually completed.

So, I have no reason to believe that this feature of Steam is broken.

I believe the fragmentation is internal to Steam's gcf/ncf files. I think those files essentially contain a file system of their own, sort of like a disk image. I think that as Steam updates are downloaded, they are essentially appended to the file. I think that defragmenting is an operation on the virtual file system within the file. I think a newly-downloaded game, or one which hasn't been updated much, will not have fragmentation; only games which have had a lot of updates since you originally downloaded it might have fragmentation.

Ken Thomases wrote:

I believe the fragmentation is internal to Steam's gcf/ncf files. I
think those files essentially contain a file system of their own,
sort of like a disk image. [...]

GCF files are indeed virtual filesystems (so they fragment over time when updates are applied). NCF however are just index files (probably mainly version information) for games whose data is stored in the normal filesystem (usually within the "SteamApps/common" directory). I think GCF is only used by games using the Source and GoldSource engines. The only exception I know about is L4D (and L4D2).

Andreas Schneider wrote:

Ken Thomases wrote:

I believe the fragmentation is internal to Steam's gcf/ncf
files. I think those files essentially contain a file system of
their own, sort of like a disk image. [...]

GCF files are indeed virtual filesystems (so they fragment over time
when updates are applied). NCF however are just index files
(probably mainly version information) for games whose data is stored
in the normal filesystem (usually within the "SteamApps/common"
directory). I think GCF is only used by games using the Source and
GoldSource engines. The only exception I know about is L4D (and
L4D2).

Actually, there's a number of game engine/titles that use the gcf
system/file...the Gmotor engine is one I can think of off the top
of my head, but there are others in exception here...not just L4D(2)

Also, the "SteamApps/common" directory is sometimes used for other
game files tagged by ncf files - the rest of the time, "SteamApps/[username]"
directory is used instead (where [username] is your Steam account name).

Cheers!

CrossOver Forums: the place to discuss running Windows applications on Mac and Linux

CodeWeavers or its third-party tools process personal data (e.g. browsing data or IP addresses) and use cookies or other identifiers, which are necessary for its functioning and required to achieve the purposes illustrated in our Privacy Policy. You accept the use of cookies or other identifiers by clicking the Acknowledge button.
Please Wait...
eyJjb3VudHJ5IjoiVVMiLCJsYW5nIjoiZW4iLCJjYXJ0IjowLCJ0enMiOi02LCJjZG4iOiJodHRwczpcL1wvbWVkaWEuY29kZXdlYXZlcnMuY29tXC9wdWJcL2Nyb3Nzb3Zlclwvd2Vic2l0ZSIsImNkbnRzIjoxNzM5NTcwNzYwLCJjc3JmX3Rva2VuIjoiR1NlQ0s5NEdQY3BUM3lUZyIsImdkcHIiOjB9