Skip to content

gh-102184: Test os.sync() only if "largefile" resource is enabled - #102185

Closed
izbyshev wants to merge 1 commit into
python:mainfrom
izbyshev:expensive-sync
Closed

gh-102184: Test os.sync() only if "largefile" resource is enabled#102185
izbyshev wants to merge 1 commit into
python:mainfrom
izbyshev:expensive-sync

Conversation

@izbyshev

@izbyshev izbyshev commented Feb 23, 2023

Copy link
Copy Markdown
Contributor

Calling os.sync() when the Linux page cache is large and full of dirty pages and the storage device is slow can block the process in "uninterruptible sleep" state for minutes, making the test run unkillable even with SIGKILL. Avoid this by testing os.sync() only if "largefile" resource is enabled.

Calling `os.sync()` when the Linux page cache is large and full of dirty
pages and the storage device is slow can block the process in
"uninterruptible sleep" state for minutes, making the test run
unkillable even with SIGKILL. Avoid this by testing `os.sync()` only if
"largefile" resource is enabled.
@arhadthedev arhadthedev added the performance Performance or resource usage label Feb 23, 2023

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you, it looks like a good idea.

There is also "cpu" resource and new "walltime" resource. "cpu" is disabled by default on CI and in "make test", so it may be better choice than "largefille".

You can also move this test into a separate method and decorate it as bigmemtest. It will be skipped on most buildbots except special buildbots with a large amount of RAM.

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Apr 12, 2026
@serhiy-storchaka

Copy link
Copy Markdown
Member

Superseded by #155448, which gates sync() on walltime as suggested in the review above -- I opened it rather than waiting longer, since there was no response here. Thank you for the patch and for the report, and sorry it sat so long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review performance Performance or resource usage stale Stale PR or inactive for long period of time. tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants