Sign up ×

Any program I make has two stages it can be in: using as much of the processor as possible, and blocking, waiting for input. Now I have programs on my computer, things like Backblaze, which run gradually in the background (though with some occasional spikes when encrypting files). What are some good ways to make a program run slowly and unnoticeable? The only thing I could think of would be to fill it with sleep statements, which seems awfully inefficient. I'm not asking about a specific language here, just some general theory.

Any thoughts?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

In general, program is noticeable if it uses either CPU or disk. For CPU, you can decrease the process priority: nice(10) on Linux, SetPriorityClass(..._IDLE) on Windows.

For HDD, there is "ionice" on Linux, and I am not sure if anything exists on Windows. You might just have to rate-limit your disk reads and writes, if you have many of them.

share|improve this answer

Your Answer


