AndyGrant / OpenBench

OpenBench is a Distributed SPRT Testing Framework for Chess Engines
GNU General Public License v3.0
144 stars 138 forks source link

Time slot management #179

Closed tryingsomestuff closed 10 months ago

tryingsomestuff commented 10 months ago

Openbench is already having a --threads option in order to allow it to use only a specific number of resources of a machine. It would be nice to have a time slots option in order to say "you are allow to take jobs between 6pm and 8am for instance. Or even better a json config file for the client that may look like that

{ time_slots : [
   { threads: 1, begin: "8:30", end: "10:30" },
   { threads: 8, begin: "12:00", end: "15:30" },
   { threads: 4, begin: "18:30", end: "00:30" }
]}

outside of the slots, threads would be equal to 0.

What do you think of that ?

AndyGrant commented 10 months ago

I don't have anything against it in particular; although it is not of any use to me personally, or for chesscom. Most machines working on fishtest/openbench tend to be dedicated machines.

I would think this would be better suited as a cron job or such on your machine. You fire up the client at 8:30. At 10:30, you create the openbench.exit file to trigger the machine to gracefully shutdown the openbench processes. At 12:00, you repeat the process, and ensure that your first step is to remove the openbench.exit signal.

tryingsomestuff commented 10 months ago

Oh thank I wans't aware of the openbench.exit trick. So indeed, it's easy to write a little service or cron thing that will take care of that.