You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- monkey patch for delayed_jobs to allow configurable lock method
- config via jobs.read_ahead (number of jobs to read)
- postgres default = 0 (use lock_with_for_update)
- mysql default = 5 (use lock_with_read_ahead)
- jobs.read_ahead = 0: lock_with_for_update = lock jobs using SELECT FOR UPDATE
- jobs.read_ahead > 0: lock_with_read_ahead = optimistic locking of jobs
- add rake task generate_load to create jobs
Using lock_with_for_update showed severe performance problems on postgres
when there is a high number of jobs in the queue (>50k). Job processing
starves due to row locks and temp IO gets high.
lock_with_read_ahead performs much better under such load situations.
Performance on low/normal job load is comparable.
0 commit comments