Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logview threadpool #861

Merged

Conversation

DiegoTavares
Copy link
Collaborator

Link the Issue(s) this Pull Request is related to.
Users using the LogView were experiencing slowness on all opened widget when big log files were being streamed.

Summarize your change.
Add QtCore.QThreadPool logic for handling incoming log update requests.

DiegoTavares and others added 4 commits September 30, 2020 09:51
Sorting jobs only by priority causes a situation where low priority jobs can get starved by a constant flow of high priority jobs.
The new formula adds a modifier to the sorting rank to take into account the number of cores the job is requesting and also the number of days the job is waiting on the queue.
Priorities numbers over 200 will mostly override the formula and work as a priority only based scheduling.
sort = priority + (100 * (1 - (job.cores/job.int_min_cores))) + (age in days)

Besides that, also take layer_int_cores_min into account when filtering folder_resourse limitations to avoid allocating more cores than the folder limits.

(cherry picked from commit 566411aeeddc60983a30eabe121fd03263d05525)
(cherry picked from commit 351e210a9f0d49bfe61e9a57bba349bf1951af4e)
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Dec 10, 2020

CLA Signed

The committers listed above are authorized under a signed CLA.

@DiegoTavares
Copy link
Collaborator Author

We're working on the pending SLA for Fermi (owner of the original commit for this issue)

For some ui process that especially involves multi threading or
concurrent update of widget data, some warnings can happen due to
obsolete function calls. The code has been updated to suppress
a couple of known warnings

(cherry picked from commit dd0c4f900fb75d25d63897b6aacd2d0b02e230f5)
(cherry picked from commit 09446bbe5f0c631c74525cbc78b0e60ce114a2e2)
donalm added a commit to donalm/OpenCue that referenced this pull request Oct 2, 2021
donalm added a commit to donalm/OpenCue that referenced this pull request Oct 2, 2021
… freeze when using the log viewer."

This reverts commit fe799f3.
Copy link
Collaborator

@bcipriano bcipriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some of the PySide2 references need to be updated to the new qtpy style.

Signed-off-by: Diego Tavares da Silva <[email protected]>
@DiegoTavares
Copy link
Collaborator Author

@bcipriano Ready for review

finally:
QtCore.QTimer.singleShot(5000, self._display_log_content)

def _update_log(self):
# pylint: disable=no-self-use
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: If there's no self use, can this be a static method? If not, add a comment explaining why.

@DiegoTavares DiegoTavares merged commit c1dcad9 into AcademySoftwareFoundation:master Jan 30, 2024
12 checks passed
carlosfelgarcia pushed a commit to carlosfelgarcia/OpenCue that referenced this pull request May 22, 2024
* Update dispatchQuery to use min_cores

Sorting jobs only by priority causes a situation where low priority jobs can get starved by a constant flow of high priority jobs.
The new formula adds a modifier to the sorting rank to take into account the number of cores the job is requesting and also the number of days the job is waiting on the queue.
Priorities numbers over 200 will mostly override the formula and work as a priority only based scheduling.
sort = priority + (100 * (1 - (job.cores/job.int_min_cores))) + (age in days)

Besides that, also take layer_int_cores_min into account when filtering folder_resourse limitations to avoid allocating more cores than the folder limits.

(cherry picked from commit 566411aeeddc60983a30eabe121fd03263d05525)

* Revert "Update dispatchQuery to use min_cores"

This reverts commit 2eb4936

* Add threadpool logic for handling incoming log update requests

(cherry picked from commit 351e210a9f0d49bfe61e9a57bba349bf1951af4e)

* Suppress known ui warning messages

For some ui process that especially involves multi threading or
concurrent update of widget data, some warnings can happen due to
obsolete function calls. The code has been updated to suppress
a couple of known warnings

(cherry picked from commit dd0c4f900fb75d25d63897b6aacd2d0b02e230f5)

* Fix logview unit tests to work around the threading logic

(cherry picked from commit 09446bbe5f0c631c74525cbc78b0e60ce114a2e2)

* FIx unit tests

* Fix python lint

* Fix python lint

* Fix lint

Signed-off-by: Diego Tavares da Silva <[email protected]>

---------

Signed-off-by: Diego Tavares da Silva <[email protected]>
Co-authored-by: Fermi Perumal <[email protected]>
carlosfelgarcia pushed a commit to carlosfelgarcia/OpenCue that referenced this pull request May 22, 2024
* Update dispatchQuery to use min_cores

Sorting jobs only by priority causes a situation where low priority jobs can get starved by a constant flow of high priority jobs.
The new formula adds a modifier to the sorting rank to take into account the number of cores the job is requesting and also the number of days the job is waiting on the queue.
Priorities numbers over 200 will mostly override the formula and work as a priority only based scheduling.
sort = priority + (100 * (1 - (job.cores/job.int_min_cores))) + (age in days)

Besides that, also take layer_int_cores_min into account when filtering folder_resourse limitations to avoid allocating more cores than the folder limits.

(cherry picked from commit 566411aeeddc60983a30eabe121fd03263d05525)

* Revert "Update dispatchQuery to use min_cores"

This reverts commit 2eb4936

* Add threadpool logic for handling incoming log update requests

(cherry picked from commit 351e210a9f0d49bfe61e9a57bba349bf1951af4e)

* Suppress known ui warning messages

For some ui process that especially involves multi threading or
concurrent update of widget data, some warnings can happen due to
obsolete function calls. The code has been updated to suppress
a couple of known warnings

(cherry picked from commit dd0c4f900fb75d25d63897b6aacd2d0b02e230f5)

* Fix logview unit tests to work around the threading logic

(cherry picked from commit 09446bbe5f0c631c74525cbc78b0e60ce114a2e2)

* FIx unit tests

* Fix python lint

* Fix python lint

* Fix lint

Signed-off-by: Diego Tavares da Silva <[email protected]>

---------

Signed-off-by: Diego Tavares da Silva <[email protected]>
Co-authored-by: Fermi Perumal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants