Why is python shipped with the `python` docker image slower than that of my local machine?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- docker, python
- Domain
- devops, performance
Research direction
Start by reproducing the reported benchmark in the python:3 image and comparing it with the ppa:deadsnakes/ppa installation. Inspect /usr/bin/python3.10 and docker-python/local/bin/python3.10, then determine whether the reported debug_info difference accounts for the roughly 11% overhead.
Written by the indexing model from the issue text.
Description
I've observed a roughly 11% performance overhead when using the python distribution shipped with the python:3 image, compared to the python distribution installable through ppa:deadsnakes/ppa: https://stackoverflow.com/a/76133102/2808520
| local | dockerbinary | |
|---|---|---|
| avg | 0.79917586 | 0.89829016 |
| std | 0.02433539 | 0.03554546 |
| min | 0.78087375 | 0.86344007 |
| q1 | 0.78211388 | 0.86950620 |
| q2 | 0.79006154 | 0.88853465 |
| q3 | 0.80732969 | 0.91612282 |
| max | 0.89824817 | 0.99477790 |
$ file `which python3.10`
/usr/bin/python3.10: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=fb3f4369481251e6ba441382fd6d9ab47af0db29, for GNU/Linux 3.2.0, stripped
$ file docker-python/local/bin/python3.10
docker-python/local/bin/python3.10: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=618b23f947f202224f4ea8e16375ac7bcad13c4f, for GNU/Linux 3.2.0, with debug_info, not stripped
My guess is that the with debug_info compilation introduces this ~11% performance overhead.
I'd appreciate if someone could tell me if my guess is correct.
- Dominant language
- Dockerfile
- Stars
- 2.8k
- Forks
- 1.1k
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from docker-library/python
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
docker-library/python#1080 · 8 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
docker-library/python#1121 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
docker-library/python#1082 · 10 comments · 36 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
docker-library/python#1076 · 6 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
docker-library/python#1071 · 7 comments ·
All issues in docker-library/python
Similar issues
-
Add dependabot Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
-
oblt-aw/detector/security
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Type: AVM :a: :v: :m: Type: Bug :bug:
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Azure/bicep-registry-modules#7386 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100