Cpu intensive tasks - How to manage?

Hi!

I’m trying to save 1500 users, and the password hashing is killing my overall performance. The CPU is in 100% always.

Currently, I passed this task to a job (vsivsi-job-collection) with a setTimeout, but is useless… or the job takes too much time, or meteor takes too long to the other users.

Do you have any solution to this, for a single-core server?

Thanks!

1 Like

what you could do is write a second Meteor app or maybe just a simple node worker who does this stuff for you. then you only need to find a proper way on to restrict this separate node process to xy% of the CPU.

@klabauter Do you know how to restrict the process to a percent of the cpu?

Thanks for your answer!!

Google is your friend mate! :wink: https://www.howtoforge.com/how-to-limit-cpu-usage-of-a-process-with-cpulimit-debian-ubuntu

1 Like

Thanks! This was the best solution that I can found. The module is aprox 1 month in production without problems! :slight_smile: