Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make project size calculation optional #3530

Closed
Tracked by #3394
CSC-swesters opened this issue Apr 24, 2024 · 4 comments · Fixed by #3531
Closed
Tracked by #3394

Make project size calculation optional #3530

CSC-swesters opened this issue Apr 24, 2024 · 4 comments · Fixed by #3531
Labels
community request enhancement This is functionality that builds upon existing functionality. question
Milestone

Comments

@CSC-swesters
Copy link
Contributor

We noticed while trying out one of the nightly builds, that the project.rb will try to calculate the size of the project directory using du -s

def size
if Dir.exist? project_dataroot
o, e, s = Open3.capture3('timeout', "#{Configuration.project_size_timeout}s", 'du', '-s', '-b', project_dataroot.to_s)
o.split('/')[0].to_i
end
end

This should be configurable, since it would put unnecessary load on the file system, and delay the response to the user unnecessarily, if the file system where the project directory resides is under heavy load, or the project directory is very large.

I suggest adding a boolean configuration item, e.g., calculate_project_size: false (by default, is my suggestion), and then sites can enable it at will, by changing the configuration.

@osc-bot osc-bot added this to the Backlog milestone Apr 24, 2024
@johrstrom
Copy link
Contributor

OK. Though, it is done through an ajax callback, so it's asynchronous to the page load, so it doesn't affect the timing of the page load.

That said - I'm happy to provide a config given the strain it puts on the filesystem.

@CSC-swesters
Copy link
Contributor Author

I missed the AJAX part, sorry about that. Either way, we would appreciate a way to disable it 👍 Thanks!

@johrstrom
Copy link
Contributor

sorry about that

No issues! Thanks for the ticket. Yes I suspsect with larger projects (with may GB/TB of input/output data) this will be troublesome.

@abujeda
Copy link
Contributor

abujeda commented Apr 25, 2024

possible solution to disable the project size feature:
#3531

@HazelGrant HazelGrant added community request enhancement This is functionality that builds upon existing functionality. question labels Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community request enhancement This is functionality that builds upon existing functionality. question
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants