locked
Build Server with testing increases the database file size fast RRS feed

  • Question

  • Hi, I've just installed TFS 2010 on our Development server. I've configured a Build server which performs Incremental and Nightly builds. Incremental works perfectly and the database file is not big at all. Nightly, which also includes unit testing, increases the database file with 1.4GB for each build. This is not OK. The unit tests has some output, is that what ends up in the database? Can it be configured to not end up in there? I've tested to set the Retention to Latest Only, but to no success. Any help is very welcome, Eric
    Thursday, May 6, 2010 9:02 AM

Answers

  • Hello Eric,

    I have got some reply from Ruiz Yi from TFS Forum.

    You can disable to publish funciton for the unit test. Right click the corresponding build file under Build node in Team explorer, choose 'OPEN PROCESS FILE LOCATION', double click to OPEN XAML FILE, find the three RUN MSTEST FOR process and set corresponding property to 'False' to diable publish.


    Edwer Fang [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    • Marked as answer by Trayon Wednesday, May 12, 2010 9:39 AM
    Wednesday, May 12, 2010 9:18 AM
    Moderator

All replies

  • Hello,

    which database increases with 1.4 GB? Tfs_Configuration, Tfs_Warehouse or Tfs_<CollectionName>? After finding the unnormal size of database, you may go to the SMSS to view which tables got the most data to find the root cause.(Right click the database, choose Reports ->Standard Reports->Disk Usage by Tables)

    In addition, I do not think unit test could some with so many data, if you remove unit test from the build plan, does this issue still exist?


    Edwer Fang [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    Friday, May 7, 2010 8:58 AM
    Moderator
  • Hi,

    Thank you very much for your reply.

     

    The database size is not increasing with the unit tests turned off.

    The database in question is the Tfs_<CollectionName>. And the table containing the majority space taken is the dbo.tbl_AttachmentContent. 

    In a database of 9.9GB that table is using a little bit more than 6GB.

    What kind of attachment are we talking about? Can I turn it off?

     

    Best regards,

    Eric

    Monday, May 10, 2010 8:30 AM
  • Hello,

    Are you running unit test separately or within load test?

    You may go to the table to verify which files take up most space by check the CompressLength field in a unit test run.


    Edwer Fang [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    Monday, May 10, 2010 9:45 AM
    Moderator
  • I am sorry, but I am not sure what you mean.

    The unit tests are defined in separate assemblies, which are run from the TFS Build Server, using a Build definition which triggers on a certain date and time or by me manually.

    /Eric

    Monday, May 10, 2010 10:45 AM
  • Hello,

    Go to the dbo.tbl_AttachmentContent table, for one build run, find which row get the bigger number for CompressLength field, then, in these rows, get the filename field. So we can find which files take up the most space.


    Edwer Fang [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    Monday, May 10, 2010 11:20 AM
    Moderator
  • Ah, ok.

    You meant dbo.tbl_Attachment table? In this table I can see that there are a lot of big files and they come from the test outputs, just as I thought.

    Now that we know this, can I turn off so the test outputs are not saved into the database? There are no need for this data to be stored.

    I believe that the same data is also put on the harddrive and that it is this data that is used by the tests. The harddrive data is removed when the next nightly build is done, so there is no storage problem there.

     

    /Eric

    Monday, May 10, 2010 11:33 AM
  • Monday, May 10, 2010 12:15 PM
  • Anyone has any idea?
    Tuesday, May 11, 2010 6:34 AM
  • Hello Eric,

    Are the files you view from the table are what you expect after the build? If so, this may more related to TFS Configurations, I will consult with experts of that aspect to see if we can do something helpfu.


    Edwer Fang [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    Wednesday, May 12, 2010 7:21 AM
    Moderator
  • Hello Edwer,

    The files are what I expect to come out of the test cases. The tests uses these files to verify their success. After that, there are no use for them and I don't wish keep them around.

    Furthermore, I think that the tests i performed by the Agent. The agent produces its own test output on the disk, so I don't think there are any reason at all for the test output to end up in the database.

    /Eric

    Wednesday, May 12, 2010 8:03 AM
  • Hello Eric,

    I have got some reply from Ruiz Yi from TFS Forum.

    You can disable to publish funciton for the unit test. Right click the corresponding build file under Build node in Team explorer, choose 'OPEN PROCESS FILE LOCATION', double click to OPEN XAML FILE, find the three RUN MSTEST FOR process and set corresponding property to 'False' to diable publish.


    Edwer Fang [MSFT]
    MSDN Subscriber Support in Forum
    If you have any feedback on our support, please contact msdnmg @ microsoft.com

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Send us any feedback you have about the help from MSFT at fbmsdn@microsoft.com.
    • Marked as answer by Trayon Wednesday, May 12, 2010 9:39 AM
    Wednesday, May 12, 2010 9:18 AM
    Moderator
  • Yes, that did the trick! Thank you very much for your awesome help!

    /Eric

    Wednesday, May 12, 2010 9:39 AM