Is having high CPU usage often bad?

Hello,

A bit of context
I am coding an application for the timetable (agenda) of my university. For that, I need to make periodic requests from the central calendar service of the school and parse the data before storing it in a SQLITE database.

As a reference, I am currently holding around 20 000 events (lectures, classes, etc). And as you may think, this retrieve-parse-store operation is using quite a lot of CPU on my glitch container (100% most of the time).

Although it is, during parsing, causing the webpages to take more time to load, the additional loading time is marginal and therefore of no concern at the moment.

The project is boosted, so I have a higher CPU limit.

My question
I was wondering if having high CPU usage often and/or for a long period of time is reprimanded by an automated system (like when you reach your allocated storage size) or anything of the sort.

Thank you very much !
Joprocorp

Staff should correctly if I’m wrong, but I don’t believe your project will be banned if you use 100% of your CPU at all times. I’ve seen a few users fearful of their projects being shut down if they use high CPU, but I have seen no cases of staff taking down a project because of high CPU.

That being said, you should still review the technical restrictions page above (which does not contain anything on CPU).

1 Like

I don’t know the answer to your question but I would suggest (regardless of any limit) that you do your best to reduce unnecessary CPU demand. By unnecessary I mean at least consider some alternative ways to do the processing you need. So not that you shouldn’t push the CPU but if you can get twice as much done for the power being used so much the better.

I don’t know what it involves or how often you run it but it may be possible to split the task and/or off-load some parts to a second Glitch app instance. You may still experience high CPU usage but perhaps for less time and one of the apps would conceivably not be used for webpage UI…

1 Like

Hard to say. There’s a rule somewhere that doing something that affects the system’s stability is not allowed. But we have yet to see a case of anyone being penalized for high CPU usage.

There are some specific high-CPU activities that are forbidden, such as crypto mining.

Glitch uses Linux’s CPU quota system, so I’d guess that this is something that wouldn’t need a special penalty system.

1 Like