Related to bug #361,
when borg is busy looking for files to backup, borgmatic is chewing up the CPU like mad.
Right now, borg is using 10%, borgmatic is using 80%.
My guess is the execute.py loop (waiting for data on the pipes) is polling with no sleep.
I think it needs to wait on both output_buffers and processes.
I added this line: time.sleep(0.1) (see below), and import time at the top of the file, of course.
And now borgmatic was a lot better behaved.
I’m not a python guy so I can’t help further on that.
if output_buffers: (ready_buffers, _, _) = select.select(output_buffers, , ) for ready_buffer in ready_buffers: line = ready_buffer.readline().rstrip().decode() if not line: continue # Keep the last few lines of output in case the process errors, and we need the output for # the exception below. last_lines = buffer_last_lines[ready_buffer] last_lines.append(line) if len(last_lines) > ERROR_OUTPUT_MAX_LINE_COUNT: last_lines.pop(0) logger.log(output_log_level, line) else: ### HERE is my addition time.sleep(0.1) ### HERE is my addition