I think gearman and theschwartz workers might be categorically exempt, since they have well-defined ways to assign a specific task to a worker.
I would look at things like schedule-synsuck and subscribe-hubbub that grab a chunk of rows from some table, iterate over them updating something, and then sleep. If you have more than one running for some reason, they might be working on the same chunk of rows and duplicating tasks.
Some workers of this type (e.g., birthday-notify and expunge-users) use DDLockClient via LJ::locker->trylock() to avoid stepping on each other if running multiple instances. This requires running ddlockd and setting @LJ::LOCK_SERVERS if the instances are on different servers. It might be pointless anyway to run more than one because of the timing of their sleep/work cycles.
no subject
I would look at things like schedule-synsuck and subscribe-hubbub that grab a chunk of rows from some table, iterate over them updating something, and then sleep. If you have more than one running for some reason, they might be working on the same chunk of rows and duplicating tasks.
Some workers of this type (e.g., birthday-notify and expunge-users) use DDLockClient via LJ::locker->trylock() to avoid stepping on each other if running multiple instances. This requires running ddlockd and setting @LJ::LOCK_SERVERS if the instances are on different servers. It might be pointless anyway to run more than one because of the timing of their sleep/work cycles.