Skip to content

Some tests consume too much memory #133454

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

Closed
serhiy-storchaka opened this issue May 5, 2025 · 1 comment
Closed

Some tests consume too much memory #133454

serhiy-storchaka opened this issue May 5, 2025 · 1 comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented May 5, 2025

Several years ago, all tests, except bigmem tests could be ran sequentially with just 650 MB of memory. There were issues with some buldbots (e.g. AIX) which small RAM, because excess memory consumption not always caused a quick test failure, but could cause swapping and failing tests at timeout 2 hours later. So all tests with high memory consumption were decorated with bigmemtest.

Now, some tests need more than 1 GB of memory, or even more than 2 GB. Not all buildbots have such much.

The main culprit is running too many threads. Every thread needs 35, 70 or even 90 MB, depending on test.

There are two possible solutions:

  1. Decrease the number of threads. Some tests can perform their function with fewer threads, but this must be decided individually so as not to make the test useless.
  2. Decorate the test with bigmemtest. This will skip it on most buildbots.

Linked PRs

@serhiy-storchaka serhiy-storchaka added the tests Tests in the Lib/test dir label May 5, 2025
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue May 5, 2025
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue May 5, 2025
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue May 5, 2025
…nd_releasebuf

The original reproducer only used 10 threads.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 8, 2025
… bigmem (pythonGH-133456)

(cherry picked from commit 26839ea)

Co-authored-by: Serhiy Storchaka <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 8, 2025
… bigmem (pythonGH-133456)

(cherry picked from commit 26839ea)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit that referenced this issue May 8, 2025
…s bigmem (GH-133456) (GH-133664)

(cherry picked from commit 26839ea)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit that referenced this issue May 8, 2025
…s bigmem (GH-133456) (GH-133663)

(cherry picked from commit 26839ea)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this issue May 23, 2025
50 producer and 50 consumer threads need more than 5GB of memory.
@picnixz picnixz added the type-bug An unexpected behavior, bug, or error label May 23, 2025
serhiy-storchaka added a commit that referenced this issue May 23, 2025
…easebuf (GH-133458)

The original reproducer only used 10 threads.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 23, 2025
…nd_releasebuf (pythonGH-133458)

The original reproducer only used 10 threads.
(cherry picked from commit fc0c9c2)

Co-authored-by: Serhiy Storchaka <[email protected]>
serhiy-storchaka added a commit that referenced this issue May 23, 2025
…and_releasebuf (GH-133458) (GH-134589)

The original reproducer only used 10 threads.
(cherry picked from commit fc0c9c2)

Co-authored-by: Serhiy Storchaka <[email protected]>
@serhiy-storchaka
Copy link
Member Author

I think it's all for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants