Does a CRON job use only 1 thread ? #126
Replies: 1 comment 1 reply
-
Hi @IoannisMaras, After taking a look at the source code it appears you're absolutely correct, all cron jobs are run within an async task on the main thread of your Julia application regardless of how many threads are available. Thankfully, this should be a simple and quick fix. I should only have to change my With that said, what kind of hardware are you running your web application on? Running with 20 threads is the highest number I've heard from anyone using this package. The reason I bring this up is that adding more threads doesn't always make the performance better. Once you get past a certain threshold it actually negatively impacts performance and will slow down your api by a lot. Anecdotally, my personal computer has 12 cores and I generally get the best performance when running with 2-4 threads |
Beta Was this translation helpful? Give feedback.
-
I was wondering if a cron job is using only 1 thread , because I run my oxygen app with 20 threads and I have a cron job that checks an array of model requests and if there is a request it handles the first one of a queue . When I run my script without oxygen it takes around 2-5 minutes but when I run it with oxygen (having 20 threads) it takes around 15-20 minutes.
If someone has handled anything similar please let me know
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions