user5955036
user5955036

Reputation:

TFS does not destroy files, unused space does not get set free

I deleted a lot of files and used the TF DESTROY cmd tool afterwards. After realizing that I missed the /startcleanup command I thought like "oh, well, tomorrow the space will be free since TFS cleans up by itself".

The next day: nothing happened, around 80GB should be freed up.

I went to MSSQL management studio, searched and run the stored procedures "delete unused content" and "delete unused files" and guess what happened?: I lost around 20GB of space out of nowhere, so by the time 80GB should be free, but I lost 20GB.

Any explanation of this? something I did wrong?

I am using TFS 15

Upvotes: 4

Views: 913

Answers (1)

betelgeuce
betelgeuce

Reputation: 837

If you are talking about the size of the database then you may need to manually resize this to free up space.

Delete operations from a table or update operations that cause a row to move can immediately free up space on a page by removing references to the row. However, under certain circumstances, the row can physically remain on the data page as a ghost record. Ghost records are periodically removed by a background process. This residual data is not returned by the Database Engine in response to queries.

However, in environments in which the physical security of the data or backup files is at risk, you can use sp_clean_db_free_space to clean these ghost records.

Upvotes: 0

Related Questions