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

Usage accounting #329

Open
rowleya opened this issue May 19, 2021 · 11 comments
Open

Usage accounting #329

rowleya opened this issue May 19, 2021 · 11 comments
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested spalloc server Relating to the new spalloc server
Milestone

Comments

@rowleya
Copy link
Member

rowleya commented May 19, 2021

It could be potentially useful for the spalloc service to support user usage accounting, in particular for EBRAINS users. This would make it easier to keep track of usage on the Jupyter service for example, where it is otherwise necessary to track usage more manually.

Notes:

  • This would probably need to be selective based on "user type" e.g. local users wouldn't want to be subject to constraints, but remote users might have quotas that shouldn't be exceeded.
    • A local user might be recognised by IP address or some other mechanism.
    • An EBRAINS user might be recognised by using an EBRAINS token.
  • There is an NMPI quota service that this could interact with.
    • This could be updated at each "keep-alive", if this is still implemented, by then subtracting resource from the quota equivalent to size of machine * keep alive duration.
    • This would mean that infinite keep-alive would be disallowed for EBRAINS users.
    • If the quota service reports that the user has run out of quota, the machine would be released and the job killed (with an out-of-quota message).
@rowleya rowleya added the enhancement New feature or request label May 19, 2021
@rowleya
Copy link
Member Author

rowleya commented May 19, 2021

An additional thought - the current NMPI quota is based on collabs. The collab ID would then need to be specified in the job request along with the EBRAINS authentication token. The process would then be to first check (via another service) that the user can access the collab, then the quota is removed from the collab assignment as described above.

@dkfellows
Copy link
Member

dkfellows commented Jun 21, 2021

Identifying users is one of the critical parts of this. See #338

@dkfellows dkfellows added the spalloc server Relating to the new spalloc server label Jun 21, 2021
@Christian-B
Copy link
Member

One option here is two have two stage quota.

Stage one all users have a reasonable individual quota that we track locally.

Stage two if specific users need more quota they have to provide their collab ID and then we extend in large blocks individual quota by reducing their collab assignment.

This has the advantage of working for most users without the extra collab ID overhead, reduces the calls to the collab and means that other users in a collab would have some usage even if the collab runs out.

@rowleya
Copy link
Member Author

rowleya commented Jun 21, 2021

We could also have an interface here that interacts with the NMPI quota at a different level if we can agree it with them. This would be that they send us any quota updates, and their API queries ours when a request for how much quota is available / used is made.

@dkfellows
Copy link
Member

I've added a local quota system (using board-seconds as the fundamental unit) but I don't understand yet how to merge this with a remote quota system.

@dkfellows dkfellows added the help wanted Extra attention is needed label Jun 30, 2021
@rowleya
Copy link
Member Author

rowleya commented Jun 30, 2021

Interaction is as yet undefined; we can ask Andrew Davidson about quotas etc. and see if we can make something that will work at some point. Having a local system at least means that we can control things, which is the first step!

@dkfellows
Copy link
Member

Still need some way of editing the quota. Currently it's only settable by direct database access, which is obviously unacceptable.

@dkfellows
Copy link
Member

Quotas also supported with OIDC login.

Default quota isn't right, but that's a config parameter.

@dkfellows dkfellows pinned this issue Dec 17, 2021
@dkfellows
Copy link
Member

Can now add or remove quota via administration interface, in units of 1, 10, 100, and 1000 board hours.

Just need a default. And a decision about whether local users (those with non-HBP logins) get different default quotas.

@dkfellows dkfellows added the question Further information is requested label Jan 29, 2022
@dkfellows
Copy link
Member

See also #413

@dkfellows
Copy link
Member

See also #414

@dkfellows dkfellows changed the title Feature Request for Spalloc Server: Usage accounting Usage accounting Apr 10, 2022
@dkfellows dkfellows moved this to In progress in Spalloc Server Aug 4, 2022
@dkfellows dkfellows added this to the Bluesky milestone Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed question Further information is requested spalloc server Relating to the new spalloc server
Projects
Status: In progress
Development

No branches or pull requests

3 participants