File upload task called from launchAgent process sometimes take too long.

Hi,

I'm working on macOS launchAgent based project, and using 3rd party code to upload big files to remote server.

from time to time, I see that the upload rate is very slow and when i try it to use command line tool, the paste is much faster.

Therefore, I believe that launchAgent based processes, may get low priority in using network bandwidth compared to foreground tools. I wonder if there's anything I can do on the process' info.plist file to get better prioritization on network resources.

Perhaps I need to call the file uploader/downloader from dedicated XPC helper tool, but I prefer doing it from the same process.

Thanks !

Replies

What networking API are you using?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I'm using boost-***** with openssl as an underlying socket.

is it possible that launchAgent get less bandwidth when other foreground processes compete on the same resources ?

is it possible that [it] get less bandwidth when other foreground processes compete on the same resources ?

Yes. It’s also possible that it’s getting less CPU. See the description of ProcessType in the launchd.plist man page.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"