Ask Your Question
0

Can I set quotas for CPU-hours, RAM(MB-hr), Disk (GB-hr)?

asked 2019-08-08 11:45:07 -0500

qumulus gravatar image

I can currently set up quotas for # of vCPUs, total RAM, and total disk storage. Can I set quotas in terms of CPU-hr, RAM (MB-hr), disk (GB-hr)? I don't see the possibility when I look at the list of options, but please let me know if there is indeed a way.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2019-08-11 09:01:14 -0500

Stephen C gravatar image

Our use case is to give our HPC users a certain number of compute, memory, and storage hours. Users can buy more time/allocations as needed, similar to Google Compute Engine. Is it possible to use what you've listed for this purpose?

It should be possible. Another possibility would be to use nova usage to get the usage for the project.

But the Telemetry service and nova usage only measure things. To implement quotas, you also need to check the measurements, compare them against the quotas that you have set (and recorded somewhere), and then take the appropriate actions to enforce quotas.

You also need to decide what you will do to enforce the quotas. Are you going to send emails to users? Are you going stop, shutdown, delete instances? Are you going to snapshot them first?

Finally, you need to write the code that implements the quota enforcement. A simple way would be to implement some python scripting to query the relevant sources to get quotas and usage, then send commands to nova, cinder, whatever to take the enforcement action. Run this script from a cron job.

edit flag offensive delete link more
1

answered 2019-08-08 21:02:18 -0500

Quotas can only be used to limit the amount of resources a project or user can own, not the rate at which resources are allocated.

What is your use case? I wonder if Telemetry (Ceilometer, Aodh, Gnocchi) can be used to solve your problem.

edit flag offensive delete link more

Comments

Our use case is to give our HPC users a certain number of compute, memory, and storage hours. Users can buy more time/allocations as needed, similar to Google Compute Engine. Is it possible to use what you've listed for this purpose?

qumulus gravatar imagequmulus ( 2019-08-09 07:54:27 -0500 )edit
1

You can measure CPU time and other details and bill your users accordingly. You can also set alarms when certain conditions are met, such as going over the agreed CPU time, and configure alarm actions.

Bernd Bausch gravatar imageBernd Bausch ( 2019-08-11 09:46:51 -0500 )edit
1

As an alarm action, you could stop instances, disable users so that they can't log on etc. The alarm action requires a certain amount of development, I am afraid, but it should be possible to achieve your goal.

Bernd Bausch gravatar imageBernd Bausch ( 2019-08-11 09:49:01 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2019-08-08 11:45:07 -0500

Seen: 32 times

Last updated: Aug 11