databend icon indicating copy to clipboard operation
databend copied to clipboard

Feature: add resource quota

Open FANNG1 opened this issue 2 years ago • 1 comments

now we use 'max_threads' to control cpu resource, we should add other configs like 'max_query_time', 'max_mem' to prevent bad sql ooms databend. any plan to implement this?

FANNG1 avatar Aug 01 '22 07:08 FANNG1

After the new processor and new planner tasks are finished, the resource quota task will start.

BohuTANG avatar Aug 01 '22 08:08 BohuTANG

Update: Add a new setting max_execute_time to control max execution time(In milliseconds), you can set it for a session:

set max_execute_time=100;

or for a cluster:

set global max_execute_time=100;

cc @sandflee

BohuTANG avatar Aug 30 '22 05:08 BohuTANG

cool

FANNG1 avatar Aug 30 '22 06:08 FANNG1

max_memory_usage will be implemented in #7290, but it may take some time. at present, we can't track the memory usage accurately. We are try find reasons.

zhang2014 avatar Aug 30 '22 09:08 zhang2014