views:

903

answers:

3

I have TFS installed on a single server and am running out of space on the disk. (We've been using the instance for about 2 years now.)

Looking at the tables in SQL Server what seems to be culprit is the tbl_content table, it is at 70 GB. If I do a get on the entire source tree for all projects it is only about 8 GB of data.

Is this just all the histories of the files? It seems like a 10:1 ratio just the histories...since I would think the deltas would be very small.

Does anyone know if that is a reasonable size given 8 GB of source (and 2 yrs of activity)? And if not what to look at to 'fix' this?

Thanks

+2  A: 

Hi - I can't help with the ratio question at the moment, sorry. For a short-term fix you might check to see if there is any space within the DB files that can be freed up. You may have already, but if not..

SELECT name ,size/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS AvailableSpaceInMB
FROM sys.database_files;

If the statement above returns some space you want to recover you can look into a one time DBCC SHRINKDATABASE or DBCC SHRINKFILE along with scheduling routine SQL maintenance plan that may include defragmenting the database.

DBCC SHRINKDATABASE and DBCC SHRINKFILE aren't things you should do on a regular basis, because SQL Server needs some "swap" space to move things around for optimal performance. So neither should be relied upon as your long term fix, and both could cause some noticeable performance degradation of TFS response times.

JB

JB Brown
+1  A: 

Are you seeing data growth every day, even when no activity occurs on the system? If the answer is yes, are you storing any binaries outside of the 8GB of source somewhere?

The reason that I ask is that if TFS is unable to calculate a delta or if the file exceeds the size of delta generation, TFS will duplicate the entire binary file. I don't have the link with me, but I have it on my work machine, which describes this scenario and how to fix it, in the event that this is the cause of your problems.

joseph.ferris
May this is the link re: binaries you are referring to http://rta-techie.blogspot.com/2007/11/binaries-in-tfs.html
Cody, it is! I am glad that you found it, as it appears that I had lost it when I "reorganized" my bookmarks recently. :-)
joseph.ferris
A: 

Does not anyone wonder how you would get to 8GB of code (not history) without including large binaries?

I would fathom you need to add all of the sources for Windows 2008, Linux kernel and Mac OSX together to reach that. Again, without storing any binaries, tools, images etc.

sehe