docker-library / docker-library/python

Faster Python, beyond semantic interposition

未关闭
#575 8 条评论 14 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

Request
主要语言
Dockerfile
星标
2.8k
派生
1.1k
平均合并
3 天 1 小时
30 天内合并 PR
1

描述

#501 has a useful suggestion for speeding up Python by ~20%. After that's done, it's actually possible to do better.

Host is Fedora 33. All tests were run with Python 3.9.

On host:

  • Fedora's Python gives 200K pystone/sec.
  • Conda-Forge Python gives 240K pystone/sec.

Running inside Docker 20.04 (cgroups v2 enabled):

  • fedora:33 gives 173K pystone/sec.
  • python:3.9-slim-buster, I get 169K pystone/sec.
  • ubuntu:20.04 (no shared library): 183K pystone/sec.
  • continuumio/miniconda3 with Python from Conda-Forge: 189K/sec

I am mystified why things are so much slower inside Docker. Some of this is clearly not because of the image, but the runtime. But notice the Ubuntu image is definitely faster.

With podman:

  • python:3.9-slim-buster: 204K/sec
  • continuumio/miniconda3 with Python from Conda-Forge: 230K/sec

Note that the Anaconda (default Conda) Python 3.9 does not appear faster, it's specifically whatever Conda-Forge does. I am trying to figure that out.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用 Docker 和 Podman,在 issue 中列出的 Fedora、Ubuntu、Debian slim 和 Conda-Forge 镜像上复现报告的 pystone 结果。比较这些运行之间不同的 Python 运行时和镜像条件。确定性能差距的具体、可复现原因并记录一项可执行的改进,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
docker, python
领域
devops, performance
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。