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

Substantial Degradation in Performance (Roughly 58-fold) When Downloading and Storing Small Files in Parallel on Windows 11 #112494

Closed
ilotoki0804 opened this issue Nov 28, 2023 · 2 comments
Labels
3.12 bugs and security fixes OS-windows performance Performance or resource usage type-bug An unexpected behavior, bug, or error

Comments

@ilotoki0804
Copy link

ilotoki0804 commented Nov 28, 2023

Bug report

Bug description:

During the development of my personal project, I noticed that the Python 3.12 multithreading on Windows 11 consumes significantly more CPU resources and operates at a noticeably slower pace compared to 3.11.

To assess the speed, I conducted a benchmark. The results of the benchmark indicate the following:

  • The multiprocessing.pool.ThreadPool is 1.76 times slower and consumes 33.09 times more CPU.
  • The threading.Thread is 1.51 times slower and consumes 26.18 times more CPU.
  • The multiprocessing.pool.ThreadPool on Windows Sandbox is 1.07 times slower and consumes 120.15 times more CPU in version 3.12 compared to version 3.11.4.

These characteristics were not observed during experimentation with WSL(Ubuntu). In fact, I was unable to obtain the final result due to the considerably slow operation of both Python 3.11 and 3.12.

I have compiled the results of the performance tests in a repository, which can be accessed via this link.

My system: Windows 11 Pro x64 23H2, AMD 5900HX

CPython versions tested on:

3.12

Operating systems tested on:

Windows

@ilotoki0804 ilotoki0804 added the type-bug An unexpected behavior, bug, or error label Nov 28, 2023
@AlexWaygood AlexWaygood added performance Performance or resource usage 3.12 bugs and security fixes labels Nov 28, 2023
@ilotoki0804 ilotoki0804 changed the title Substantial Degradation in Performance (Roughly 58-fold) When Download and Store Small Files in Parallel on Windows 11 Substantial Degradation in Performance (Roughly 58-fold) When Downloading and Storing Small Files in Parallel on Windows 11 Nov 28, 2023
@neonene
Copy link
Contributor

neonene commented Nov 28, 2023

Could you check whether #95031 (or #109386) has your issue?

@ilotoki0804
Copy link
Author

ilotoki0804 commented Nov 28, 2023

@neonene When I tested it on Python 3.11.6, which uses OpenSSL 3, the identical problem is occurred. I think it shows that I have the same issue with #95031.

@terryjreedy terryjreedy closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.12 bugs and security fixes OS-windows performance Performance or resource usage type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

5 participants