docker-library / docker-library/python
Why is python shipped with the `python` docker image slower than that of my local machine?
未关闭
还没有人认领这个 Issue。
- 主要语言
- Dockerfile
- 星标
- 2.8k
- 派生
- 1.1k
- 平均合并
- 3 天 1 小时
- 30 天内合并 PR
- 1
描述
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.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,在 python:3 镜像中复现报告的基准测试,并将其与 ppa:deadsnakes/ppa 的安装进行比较。检查 /usr/bin/python3.10 和 docker-python/local/bin/python3.10,然后确定报告的 debug_info 差异是否解释了约 11% 的开销。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- docker, python
- 领域
- devops, performance
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100