Search code examples
catalystbyzohozohocatalyst

Memory Allocation for Job Pool in Catalyst


I am using Catalyst Job scheduling and have created a Job Function that executes multiple API calls (around 2-3 APIs) within it. I want to ensure that my job runs smoothly without hitting memory limitations or performance issues.

Any guidance or insights from those experienced with Catalyst Job Scheduling and memory optimization would be greatly appreciated.


Solution

  • To make sure your Catalyst Job Function runs smoothly without delays, you need to allocate enough memory for your Job Pool. The Job Pool’s memory should be more than what your function needs, including the extra load from API calls. If your function needs X GB, it's best to set at least X + 1 GB to avoid issues. Instead of using just one Job Pool, you can split tasks into multiple Job Pools to handle different workloads better.

    For example, you can use a priority Job Pool (4GB-5GB) for important jobs like payment reminders and a general Job Pool (3GB-4GB) for less urgent tasks like sending emails. This way, critical jobs won’t get delayed when there’s a high load. Keep an eye on memory usage and adjust it if needed. Since the maximum memory per Job Pool is 10GB, make sure your setup matches your workload. Following this approach will help your jobs run smoothly without hitting memory limits.