Confusion with run time cap of resource pool

Arvind_KumarArvind_Kumar Community Edition User

CREATE RESOURCE POOL test
MEMORYSIZE DEFAULT
MAXMEMORYSIZE '10G'
EXECUTIONPARALLELISM 8
PRIORITY DEFAULT
RUNTIMEPRIORITY MEDIUM
RUNTIMEPRIORITYTHRESHOLD 2
QUEUETIMEOUT 5
PLANNEDCONCURRENCY 10
MAXCONCURRENCY 10
RUNTIMECAP '3 days'
SINGLEINITIATOR DEFAULT
CPUAFFINITYSET DEFAULT
CASCADE TO DEFAULT;

name       | memorysize | maxmemorysize | executionparallelism | priority | runtimepriority | runtimeprioritythreshold | queuetimeout | plannedconcurrency | maxconcurrency | runtimecap | singleinitiator | cpuaffinityset | cpuaffinitymode | cascadeto 

-----------------+------------+---------------+----------------------+----------+-----------------+--------------------------+--------------+--------------------+----------------+------------+-----------------+----------------+-----------------+-----------
test | 0% | 10G | 8 | 0 | MEDIUM | 2 | 00:00:05 | 10 | 10 | 3 | f | | ANY |
(1 row)

what if runtime cap in table resource_pools shows only a single digit like 3 or 5 what does it mean day, hour,minute or seconds.

what if will give just RUNTIMECAP '3' in create resource pool how it will take it as day, hour,minute or seconds?

Can any explain and add the same thing in documentton ?

Comments

  • [Deleted User][Deleted User] Administrator

    If you are using system table resource_pools : runtimecap - If you see value 3 , it is 3 days , if you see value 03:00 it is three hours, if you see value 00:03 it is 3 minutes and if you see value 00:00:03 it is 3 seconds .

    If you created resource pool with runtime cap of '3' it is three days. I will check documentation and open JIRA if needed. Let me know if you have more questions.

  • [Deleted User][Deleted User] Administrator

    recovery3=> create resource pool test RUNTIMECAP '3 days';
    CREATE RESOURCE POOL
    recovery3=> select * from resource_pools where name = 'test';
    pool_id | name | is_internal | memorysize | maxmemorysize | executionparallelism | priority | runtimepriority | runtimeprioritythreshold | queuetimeout | plannedconcurrency | maxconcurrency | runtimecap | singleinitiator | cpuaffinityset | cpuaffinitymode | cascadeto
    -------------------+------+-------------+------------+---------------+----------------------+----------+-----------------+--------------------------+--------------+--------------------+----------------+------------+-----------------+----------------+-----------------+-----------
    45035996275593772 | test | f | 0% | | AUTO | 0 | MEDIUM | 2 | 00:05 | AUTO | | 3 | f | | ANY |
    (1 row)

    recovery3=> alter resource pool test RUNTIMECAP '3 minutes';
    ALTER RESOURCE POOL
    recovery3=> select * from resource_pools where name = 'test';
    pool_id | name | is_internal | memorysize | maxmemorysize | executionparallelism | priority | runtimepriority | runtimeprioritythreshold | queuetimeout | plannedconcurrency | maxconcurrency | runtimecap | singleinitiator | cpuaffinityset | cpuaffinitymode | cascadeto
    -------------------+------+-------------+------------+---------------+----------------------+----------+-----------------+--------------------------+--------------+--------------------+----------------+------------+-----------------+----------------+-----------------+-----------
    45035996275593772 | test | f | 0% | | AUTO | 0 | MEDIUM | 2 | 00:05 | AUTO | | 00:03 | f | | ANY |
    (1 row)

    recovery3=> alter resource pool test RUNTIMECAP '3 hours';
    ALTER RESOURCE POOL
    recovery3=> select * from resource_pools where name = 'test';
    pool_id | name | is_internal | memorysize | maxmemorysize | executionparallelism | priority | runtimepriority | runtimeprioritythreshold | queuetimeout | plannedconcurrency | maxconcurrency | runtimecap | singleinitiator | cpuaffinityset | cpuaffinitymode | cascadeto
    -------------------+------+-------------+------------+---------------+----------------------+----------+-----------------+--------------------------+--------------+--------------------+----------------+------------+-----------------+----------------+-----------------+-----------
    45035996275593772 | test | f | 0% | | AUTO | 0 | MEDIUM | 2 | 00:05 | AUTO | | 03:00 | f | | ANY |
    (1 row)

    recovery3=> alter resource pool test RUNTIMECAP '3 seconds';
    ALTER RESOURCE POOL
    recovery3=> select * from resource_pools where name = 'test';
    pool_id | name | is_internal | memorysize | maxmemorysize | executionparallelism | priority | runtimepriority | runtimeprioritythreshold | queuetimeout | plannedconcurrency | maxconcurrency | runtimecap | singleinitiator | cpuaffinityset | cpuaffinitymode | cascadeto
    -------------------+------+-------------+------------+---------------+----------------------+----------+-----------------+--------------------------+--------------+--------------------+----------------+------------+-----------------+----------------+-----------------+-----------
    45035996275593772 | test | f | 0% | | AUTO | 0 | MEDIUM | 2 | 00:05 | AUTO | | 00:00:03 | f | | ANY |
    (1 row)

    recovery3=> alter resource pool test RUNTIMECAP '3';
    ALTER RESOURCE POOL
    recovery3=> select * from resource_pools where name = 'test';
    pool_id | name | is_internal | memorysize | maxmemorysize | executionparallelism | priority | runtimepriority | runtimeprioritythreshold | queuetimeout | plannedconcurrency | maxconcurrency | runtimecap | singleinitiator | cpuaffinityset | cpuaffinitymode | cascadeto
    -------------------+------+-------------+------------+---------------+----------------------+----------+-----------------+--------------------------+--------------+--------------------+----------------+------------+-----------------+----------------+-----------------+-----------
    45035996275593772 | test | f | 0% | | AUTO | 0 | MEDIUM | 2 | 00:05 | AUTO | | 3 | f | | ANY |
    (1 row)

  • Arvind_KumarArvind_Kumar Community Edition User

    Thanks but this info is not in Docs , It would be really helpful if this info will be in documentation

  • [Deleted User][Deleted User] Administrator

    agreed ! i have filed doc enhancement request.

  • Arvind_KumarArvind_Kumar Community Edition User

    Thanks :smile:

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file