[gold-users] speeding up gold reservations

Stijn De Weirdt stijn.deweirdt at ugent.be
Tue Mar 3 02:19:48 MST 2009

hi all,

i'm running a maui 3.2.6p21/torque 2.3.6 with GOLD as AM and we have
some issues with users submitting large (as in 10+k) amounts of short
(5-10 minutes) jobs to the queue and this has been choking up the system

one factor in this whole process is that gold slows things down a lot. i
see gold reservation requests (Successfully reserved X credits for job
Y) when each job enter the maui queue (if i phrase this correctly), and
one when the job is done.
the first request is the most limiting one, as all new jobs in the queue
are processed on entering (although i have MAXIJOB set rather low, so
almost all of these jobs enter as blocked jobs anyway). each request
takes approx 600-700ms, and because the jobs finish more quickly then
the time needed for maui to add newly submitted jobs (not all of them,
but still a lot), cluster usage is spiked. 

maui is annoying that it doesn't make these request in parallel or
doesn't make them at all since these will be blocked jobs anyway. if the
gold requests where made when unblocking the jobs, at least the usage
would be more optimal.

but does anyone have any tips to speedup individual gold queries?

i have a tip myself: there is a certain SQL query (see bottom of mail)
that is executed rather slowly with the default schema (it's not cached
by the DB unlike almost almost all other SELECT SQL queries from gold).
(it is actually the slowest of them all, taking approx 400-500ms of teh
total 600-700ms).
we first had teh MySQL as DB, but we switched to postgres 8.3.6 (this
gave 10-15% speedup), but i found that adding another 2 partial indexes
improved this query to approx 150-200ms).

CREATE INDEX g_reservation_not_deleted_start_idx ON g_reservation
(g_start_time) WHERE g_deleted!='True';
CREATE INDEX g_resallo_not_deleted_id_idx ON g_reservation_allocation
(g_id) WHERE g_deleted!='True';

ANALYZE g_reservation;
ANALYZE g_reservation_allocation;

hope this helps,


g_reservation_allocation.g_id,g_reservation_allocation.g_amount FROM
g_reservation, g\
_reservation_allocation WHERE
( g_reservation.g_id=g_reservation_allocation.g_reservation AND
g_reservation.g_start_time<='1236070726' AND g_reservation.g_en\
d_time>'1236070726' AND  ( g_reservation_allocation.g_id='35' OR
g_reservation_allocation.g_id='20' )  ) AND g_reservation.g_deleted!
='True' AND g_reservatio\

More information about the gold-users mailing list