0

Is there any way to find the individual feed size in azure artifacts in azure devops? Using any kind of api call or any other way.

Microsoft is changing the lisencing for azure artifacts, I would wanna know which feed is taking up the most space, so I can take suitable steps to take care of this.

I've tried the feed management api to get the details of the feeds, but unfortunately that api doesn't display the size.

  • Not get your latest information, is the workaround helpful for you? Or if you have any concern, feel free to share it here. In addition, you could also vote that suggestion ticket and share your comment there, so product team would provide the updates if they view it. We will also help you vote it. Have a nice day. – Jack Zhai Nov 14 '19 at 09:24

3 Answers3

2

Use this in tfs database if you use Azure Devops Server.

select 
   [f].FeedName, 
   sum(cast([list].BlockFileLength as decimal(38)))/1024.0/1024.0 AS SizeInMb
from
   BlobStore.tbl_Blob [blob]
   join BlobStore.tbl_BlockList [list] on [list].BlobId = [blob].BlobId
   join [Feed].[tbl_PackageVersionIndex] [fd] on '0x'+[fd].StorageId = CONVERT(varchar(max),blob.BlobId ,1) 
   join [Feed].[tbl_Feed] [f] on [fd].FeedId = [f].FeedId
   join [Feed].[tbl_PackageIndex] [p] on [p].PackageId = [fd].PackageId
group by
  [f].FeedName
order by 
  SizeInMb desc

select
   [f].FeedName, 
   [p].PackageName, 
   sum(cast([list].BlockFileLength as decimal(38)))/1024.0/1024.0 AS SizeInMb,
   (select count(pvi.PackageVersionId) from [Feed].[tbl_PackageVersionIndex] [pvi]
     where pvi.FeedId = f.FeedId and pvi.PackageId = p.PackageId) as Versions
from
   BlobStore.tbl_Blob [blob]
   join BlobStore.tbl_BlockList [list] on [list].BlobId = [blob].BlobId
   join [Feed].[tbl_PackageVersionIndex] [fd] on '0x'+[fd].StorageId = CONVERT(varchar(max),blob.BlobId ,1) 
   join [Feed].[tbl_Feed] [f] on [fd].FeedId = [f].FeedId
   join [Feed].[tbl_PackageIndex] [p] on [p].PackageId = [fd].PackageId

group by    
   [f].FeedName, 
   [p].PackageName,
   f.FeedId,
   p.PackageId

order by SizeInMb desc

  • Thanks for this solution, it works great! I added the Team Project column to the first script. To do so, you'll need to add two joins; `left outer join dbo.tbl_Dataspace d on f.DataspaceId = d.DataspaceId left outer join dbo.tbl_Projects proj on d.DataspaceIdentifier = proj.project_id'` and you need to add an additional column in the select; `,isnull(proj.project_name, '**Collection Feed**') as TeamProject`. – Fokko Jan 26 '22 at 07:29
  • I now also added the IsDeleted column to know if a feed has been deleted. Please find my version on [GitHub](https://github.com/FokkoVeegens/azure-devops-server-useful-sql-scripts/blob/cbc755cf9d363a3ab94eff4f9243babac03e8c31/get-azure-artifacts-feeds-sizes.sql) – Fokko Feb 15 '22 at 08:55
1

The suggestion ticket has been closed:

To see the feed size:

  • Go to your Azure DevOps Organization and pick a project
  • Select the Project setting -> Storage
  • Under Storage Type, Select “View storage breakdown”

Then you can see the storage size of your feeds.

GetShifting
  • 461
  • 4
  • 12
0

At the moment ,there is no directly way to get the size of the feed, either from the UI or the rest api. This feature is currently not supported in azure devops.

As an inconvenient method, you can get the size of each package through the download option, and then you can add the size of these packages to get the size of the feed.

enter image description here

I created a feature suggestion ticket for you on our Developer Community form , which is our main forum for product suggestions. You can comment and vote there to increase priority.

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25