How is the approximate repository size calculated in Bitbucket Server?

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

When viewing the settings of a repository it is possible to get an estimate of the size of the repository by clicking Retrieve size details. How is the approximate size calculated?

ソリューション

Bitbucket Server uses the following process to calculate the approximate size of repositories:

  1. First it checks if any pack  files exist in the repository. If there are pack  files, the approximate size of the repository is considered to be the size of all found pack  files combined, and the process is finished.
  2. If there are no pack files in the repository Bitbucket Server will instead traverse the loose objects in the repository one by one and calculate the approximate file size by summing up the file sizes of the individual loose objects it encounters.


制限事項

We talk about "approximate size" because the calculation is not expected to be accurate. There are some factors that limit how accurately the size is calculated:

  • For performance reasons the process of traversing loose objects (step 2 above) is time-limited to 75 milliseconds. Any loose objects that Bitbucket Server isn't able to traverse within those 75 milliseconds will not be included in the calculation. This means that repositories that are particularly large or that reside on volumes with slower read speeds may show more inaccurate data. This also explains why you might see varying results if you repeatedly have Bitbucket Server calculate the approximate size. The timeout of 75 milliseconds is hardcoded and cannot be configured, and it does not apply to the calculation of the repository size if pack  files exist (step 1 above).
  • LFS data is not included in the calculation

The only reliable way of sizing a repository is to perform a full clone of it and then check the resulting directory's size on disk.

最終更新日 2021 年 7 月 21 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.