ECP-VeloC / AXL

Asynchronous Transfer Library
MIT License
2 stars 8 forks source link

Add self-throttling to pthreads #50

Open adammoody opened 5 years ago

adammoody commented 5 years ago

Some functionality we have in the daemon process, which was carried over from SCR, was to have the process self-throttle based on settings from the caller. For example, the calling application could impose a max bandwidth or a max runtime, and then the daemon would sleep accordingly so as to not exceed those limits. You can see this in the daemon code here:

https://github.com/ECP-VeloC/AXL/blob/master/src/axld.c#L636

This can be a useful feature when the async process is sharing a core with the application, with the goal being to prioritize the application in favor of the background file movement.

An open question for the team is whether we want to support this in AXL.

tonyhutter commented 5 years ago

This could be another use case for an "AXL_Config()" (#38). As far as the self-throttling goes, I don't know the answer, but at the very least we should allow the user to set the number of threads to use.