Skip to content

How to set the flags correctly to reduce CPU usage or GPU usage ? #14497

Answered by Azkazar
Azkazar asked this question in Q&A
Discussion options

You must be logged in to vote

Have you found the solution how to reduce the cpu usage, i am facing the same issue,cpu and ram usuage stays same after processing and eventually reaches to 100% and crashes the server.

oh yeah i used psu util to limit the process usage instead. works like a charm, only for the cpu though. Cant do the sam as ram.

import os
import time
import psutil
from PyQt6.QtCore import QThread, pyqtSignal
from paddleocr import PaddleOCR

class OcrWorker(QThread):
finished = pyqtSignal(list, list, float, float, float)

def __init__(self, images):
    super().__init__()
    self.images = images
    self.peak_cpu = 0
    self.execution_time = 0
    self.process = psutil.Process(os.getpid())

def limit_cp…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@awahab116
Comment options

@Azkazar
Comment options

Answer selected by Azkazar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants