Resource allocation strategy for a use case

Moderator: NorbertKrupa

Post Reply
Fred
Newbie
Newbie
Posts: 11
Joined: Thu Sep 17, 2015 9:28 pm

Resource allocation strategy for a use case

Post by Fred » Mon Sep 28, 2015 11:48 pm

Hello everyone,

I would like to understand what action does the resource manager take for allocating the resource for the following scenario.

Lets say following are the parameters for a resource pool:
MEMEORYSIZE=MAXMEMORYSIZE=4G
Planned concurrency =4
Max concurrency=4

Lets say 4 queries are submitted simultaneously and as per these parameters each query will be allocated 1G for its use by the resource manager. Lets say, one of the queries query4 needs more than 1G memory for its execution. What will be the strategy of the resource manager in this case, if the other 3 queries are still running? Lets assume that the resource manager calculated the resource requirement for the query4, when the query was initially submitted, to be less than 1G so it does not go to the queue. Does the query get aborted in this case because of the resource unavailability, as I understand, queries once start running, will not go to queue again. Is my understanding correct or is there any other way this works?

Thanks, Fred

NorbertKrupa
GURU
GURU
Posts: 527
Joined: Tue Oct 22, 2013 9:36 pm
Location: Chicago, IL
Contact:

Re: Resource allocation strategy for a use case

Post by NorbertKrupa » Tue Sep 29, 2015 12:26 am

My recommendation: test it out.

My hypothesis: depending on the timeout, it will get rejected as there are not enough resources available.
Checkout vertica.tips for more Vertica resources.

scutter
Master
Master
Posts: 302
Joined: Tue Aug 07, 2012 2:15 am

Re: Resource allocation strategy for a use case

Post by scutter » Tue Sep 29, 2015 2:11 am

Hi Fred,

You are correct - once a query begins executing, it won’t queue. If the query needs additional memory but can’t get it (in this case because of the maxmemorysize on the resource pool), the query will immediately “fail”. But Vertica will also “retry” queries several times before they truly fail. If the additional memory was for a hash join, when the query retries it will execute with an alternative algorithm that requires less memory but is also typically slower. When the query retries, it may queue.

—Sharon
Sharon Cutter
Vertica Consultant, Zazz Technologies LLC

Fred
Newbie
Newbie
Posts: 11
Joined: Thu Sep 17, 2015 9:28 pm

Re: Resource allocation strategy for a use case

Post by Fred » Tue Sep 29, 2015 7:53 pm

Thanks Sharon and Norbert for your inputs.

Fred

Post Reply

Return to “New to Vertica Database Administration”