Top all-time · #523
Itamar Turner-Trauring
Personal blog · pythonspeed.com · on HN as itamarstprogrammingdata
Itamar Turner-Trauring writes Python⇒Speed, a personal blog at pythonspeed.com about programming and data. Since 2019, 112 different Hacker News readers have linked it 450 times, most often “Alpine makes Python Docker builds slower, and images larger”. It is still writing: the last post was on 2026-08-02, and you can follow it by feed.
Rarely recommended · 2 of 40 sampled comments recommend it?
Why HN links it
HN readers link Itamar Turner-Trauring's posts for Python and Docker performance and deployment advice, especially the Alpine-versus-Debian argument, plus articles on multiprocessing, memory and benchmarking.
- Recommended for · 2 comments
- One commenter says the author's Docker best-practices articles are good and recommends the site; another highly recommends it for Docker best practices for Pyth
Summarised by Claude from a sample of 40 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Helping you deploy with confidence, ship higher quality code, and speed up your application.
Most-linked posts?
- Alpine makes Python Docker builds slower, and images larger13 people · 14 mentions · first linked 2020-01-29
- When Python can’t thread: a deep-dive into the GIL’s impact8 people · 8 mentions · first linked 2022-04-28
- Production-Ready Docker Images6 people · 8 mentions · first linked 2019-07-29
- The Performance Overhead of Python C Extensions6 people · 6 mentions · first linked 2021-04-29
- Why your multiprocessing Pool is stuck (it’s full of sharks)5 people · 5 mentions · first linked 2020-05-17
- CI for performance: Reliable benchmarking in noisy environments5 people · 5 mentions · first linked 2020-12-09
- The fastest way to read a CSV in Pandas5 people · 5 mentions · first linked 2022-01-25
- All Pythons are slow, but some are faster than others5 people · 5 mentions · first linked 2021-02-08
- The security scanner that cried wolf4 people · 5 mentions · first linked 2021-03-04
- Python’s Multiprocessing Performance Problem4 people · 5 mentions · first linked 2023-02-17
What Hacker News says?
Using Cachegrind to get hardware independent performance numbers ( https://pythonspeed.com/articles/consistent-benchmarking-in-... ) Also used by SQLite in their performance measurement workflow( https://sqlite.org/cpu.html#performance_measurement )
Comment linking /articles/consistent-benchmarking-in-ci/
on “Twenty years of Valgrind”Submitted “Let’s use Kubernetes.” Now you have eight problems as a story · 719 points
HN discussion"In Python 3.14, the default will be changed to either “spawn” or “forkserver” (a mostly safer alternative to “fork”)." - https://pythonspeed.com/articles/python-multiprocessing/
Comment linking /articles/python-multiprocessing/
on “Free-threaded CPython is ready to experiment with”Submitted When your data doesn’t fit in memory: the basic techniques as a story · 638 points
HN discussionFil can dump memory profiling reports on failed allocations; as other commenter said, Linux by default happily just gives you memory even if doesn't have any, so failed allocation implies giant allocation. https://pythonspeed.com/fil/docs/oom.html
Comment linking /fil/docs/oom.html
on “Memray: a memory profiler for Python”Submitted Simple Dockerfile examples are often broken by default as a story · 461 points
HN discussionNice! Fil looks like an awesome profiler and is fantastic that works in other platforms. I am super excited to see more cool features and https://pythonspeed.com/sciagraph/ looks fantastic :)
Comment linking /sciagraph/
on “Memray: a memory profiler for Python”Submitted Alpine makes Python Docker builds slower, and images larger as a story · 306 points
HN discussionI'm excited to see more profiling tools for Python! This sounds like it does peak memory, which is critical for batch jobs, since that's the bottleneck. Memory is fundamentally different than performance in that it's a limited resource, instead of cumulative cost; making any part of the program faster almost always helps speed up the program (at least a little, or at least reduces CPU load), but optimizing non-peak…
Comment linking /sciagraph/
on “Memray: a memory profiler for Python”Submitted Copying data is wasteful, mutating data is dangerous as a story · 230 points
HN discussionThis might help: https://pythonspeed.com/datascience/
Comment linking /datascience/
on “Go Optimization Guide”Submitted A deep dive into the official Docker image for Python as a story · 189 points
HN discussionits an ad: https://pythonspeed.com/products/pythoncontainer/ Production-Ready Python Containers is getting closer to release, but it isn’t quite ready. So sign up below to get notified when the template is available for purchase.
Comment linking /products/pythoncontainer/
on “Simple Dockerfile examples are often broken by default”Submitted Faster Python calculations with Numba as a story · 148 points
HN discussionNot an expert on Nix, but it's not so much that Nix has problems (though I'm sure it does, my initial research suggested it's not quite there yet for Python packages) but that there other things you need to get right. For example: 1. Signal handling (only one bit of https://hynek.me/articles/docker-signals/ is Dockerfile specific, the rest still applies.) 2. Configuring servers to run correctly in Docker environment…
Comment linking /articles/gunicorn-in-docker/
on “Simple Dockerfile examples are often broken by default”Submitted Loading Pydantic models from JSON without running out of memory as a story · 134 points
HN discussionGood point, will go fix that. My soon-to-be-ready attempt at a production-ready template ( https://pythonspeed.com/products/pythoncontainer/ ) covers the tradeoff between point releases vs. not-point-releases, and it does pin the OS. And yes, Nix fixes some of the problems of building a production-ready image, but only a subset.
Comment linking /products/pythoncontainer/
on “Simple Dockerfile examples are often broken by default”Submitted Loading NumPy arrays from disk: mmap() vs. Zarr/HDF5 as a story · 119 points
HN discussionI ended up expanding this into a blog post covering not the linked article (though it shares some of the same flaws), but the official docs: https://pythonspeed.com/articles/official-docker-best-practi...
Comment linking /articles/official-docker-best-practices/
on “Intro Guide to Dockerfile Best Practices”Submitted Measuring memory usage in Python: it’s tricky as a story · 116 points
HN discussionSometimes multi-stage builds are used to get build secrets into the build image. The final image just copies the resulting binaries over, and so you don't want to push the build image since you'd be leaking secrets. (I talk about alternatives to that here, since caching the build image is something you do want: https://pythonspeed.com/articles/docker-build-secrets/ ). Eventually this will be unnecessary given (curre…
Comment linking /articles/docker-build-secrets/
on “Intro Guide to Dockerfile Best Practices”Submitted The security scanner that cried wolf as a story · 104 points
HN discussionThere are some people trying to build alternative toolchains for Docker builds that remove Dockerfiles altogether, e.g. https://buildpacks.io/ and (in a very different approach) Nix-based builds. My personal approach for Python applications' Docker packaging ( https://pythonspeed.com/products/pythoncontainer/ ) was similar to yours: wrap the build process in a script. I wrote it in Python rather than bash, so it's m…
Comment linking /products/pythoncontainer/
on “Intro Guide to Dockerfile Best Practices”Submitted Profiling your Numba code as a story · 67 points
HN discussionAs is the case with the Docker's best practices for Dockerfiles in the official documentation, they're leaving out some really important details. Specifically, they don't really express how Docker packaging is a process integrating the way you build, where you build, and how you build, not just the Dockerfile. 1. Caching is great... but it can also lead to insecure images because you don't get system package updates…
Comment linking /articles/faster-multi-stage-builds/
on “Intro Guide to Dockerfile Best Practices”Submitted Using Alpine can make Python Docker builds 50× slower as a story · 61 points
HN discussionusing buildkit https://pythonspeed.com/articles/docker-build-secrets/
Comment linking /articles/docker-build-secrets/
on “Dockerfile Security Best Practices”Submitted Making pip installs a little less slow as a story · 58 points
HN discussion1. "Don't update system packages" is bad advice. There are base Docker images with out-of-date packages that need security updates. CentOS for example doesn't update their base image for months on end. 2. Given you do want system package updates, you need to deal with Docker caching breaking your security updates. So you need to rebuild your image from scratch, without caching, either every time there is a security…
Comment linking /articles/docker-build-secrets/
on “Dockerfile Security Best Practices”Submitted Writing software that's reliable enough for production as a story · 48 points
HN discussion