Problem in using Resource Manager [message #427754] |
Sun, 25 October 2009 00:33  |
khosravi
Messages: 68 Registered: April 2006
|
Member |
|
|
Hi
I wanna create a simple Resource Manager example , I do like this
begin
DBMS_RESOURCE_MANAGER.CREATE_PENDING_AREA;
DBMS_RESOURCE_MANAGER.CREATE_PLAN(PLAN => 'ali_plan', COMMENT => null);
DBMS_RESOURCE_MANAGER.CREATE_CONSUMER_GROUP (CONSUMER_GROUP => 'ali_cons_group', COMMENT =>null);
DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (PLAN => 'ali_plan', GROUP_OR_SUBPLAN => 'ali_cons_group',COMMENT =>null, CPU_P1 => 20);
DBMS_RESOURCE_MANAGER.CREATE_PLAN_DIRECTIVE (PLAN => 'ali_plan', GROUP_OR_SUBPLAN => 'OTHER_GROUPS',COMMENT =>null, CPU_P1 => 80);
DBMS_RESOURCE_MANAGER.SET_CONSUMER_GROUP_MAPPING(DBMS_RESOURCE_MANAGER.ORACLE_USER, 'ali', 'ali_cons_group');
DBMS_RESOURCE_MANAGER.VALIDATE_PENDING_AREA;
DBMS_RESOURCE_MANAGER.SUBMIT_PENDING_AREA;
end;
/
alter system set RESOURCE_MANAGER_PLAN='ali_plan';
After that I login through "ali" user , I create a table and I write a loop that insert a lot of records in the table (for example 2000000 records)
then when I refer to Enterprise Manager in "Resource Monitors" section I see that "Active Sessions" field for ALI_CONS_GROUP is 0 and the "Consumed CPU Time" for ali_cons_group is 0
and ali has added to OTHER_GROUPS
in the other words Consumer Group of "ali" not considered as ali_cons_group
do you know what's problem ?
thanks
[Updated on: Sun, 25 October 2009 00:38] Report message to a moderator
|
|
|
Re: Problem in using Resource Manager [message #427757 is a reply to message #427754] |
Sun, 25 October 2009 01:16  |
 |
Michel Cadot
Messages: 68737 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Resource Manager comes into ONLY when you are short of CPU.
A loop to insert rows can't lead to an overload of CPU, use a cpu loop in different sessions in parallel.
Regards
Michel
|
|
|