Skip to content

Conversation

trueleo
Copy link
Contributor

@trueleo trueleo commented Sep 10, 2022

Fixes #103.

Description

localsync thread is important and should run at exact intervals. To ensure this its priority is set to max. Priority setting if fails is ignored for now which means if thread_priority can't set it to max then all can be done is log it. Scheduling behaviour is dependant on the underlying OS. It is user's responsiblity to make sure that program can set thread/process priority. For example on linux you'd have to allow cpu cpuset cgroup for current user.


This PR has:

  • been tested to ensure log ingestion and log query works.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

@trueleo trueleo changed the title Set max thread_priority for local-sync. Set max thread priority for local-sync Sep 10, 2022
localsync thread is important and should run at exact intervals. To ensure this
its priority is set to max. Priority setting if fails is ignored for now
which means if thread_priority can't set it to max then all can be done is
log it. Scheduling behaviour is dependant on the underlying OS. It is
user's responsiblity to make sure that program can set thread/process priority.
For example on linux you'd have to allow `cpu cpuset` cgroup for current user.
@nitisht nitisht merged commit bb8487e into parseablehq:main Sep 10, 2022
@trueleo trueleo deleted the thread_priority branch September 10, 2022 14:50
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.

Ensure to run localsync thread with high prio

2 participants