Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
cbbc8a77
Commit
cbbc8a77
authored
Jan 22, 2020
by
Lyle Kozloff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds example to display registry disk usage by project
parent
85a7bf7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
...dministration/troubleshooting/gitlab_rails_cheat_sheet.md
+36
-0
No files found.
doc/administration/troubleshooting/gitlab_rails_cheat_sheet.md
View file @
cbbc8a77
...
@@ -895,6 +895,42 @@ loop do
...
@@ -895,6 +895,42 @@ loop do
end
end
```
```
## Registry
### Registry Disk Space Usage by Project
As a GitLab administrator, you may need to reduce disk space consumption.
A common culprit is Docker Registry images that are no longer in use. To find
the storage broken down by each project, run the following in the
GitLab Rails console:
```
ruby
projects_and_size
=
[]
# a list of projects you want to look at, can get these however
projects
=
Project
.
last
(
100
)
projects
.
each
do
|
p
|
project_total_size
=
0
container_repositories
=
p
.
container_repositories
container_repositories
.
each
do
|
c
|
c
.
tags
.
each
do
|
t
|
project_total_size
=
project_total_size
+
t
.
total_size
end
end
if
project_total_size
>
0
projects_and_size
<<
[
p
.
full_path
,
project_total_size
]
end
end
# projects_and_size is filled out now
# maybe print it as comma separated output?
projects_and_size
.
each
do
|
ps
|
puts
"%s,%s"
%
ps
end
```
## Sidekiq
## Sidekiq
### Size of a queue
### Size of a queue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment