News for hackers. Stuff that matters.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by mkesper on Saturday November 23, 2019 @05:18AM (#21613389)
Uses alpine images for small footprint

That's really become a docker meme. Please be aware you're sacrificing performance due to not using glibc.

Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by ImJasonH on Saturday November 23, 2019 @06:55AM (#21613682)
Since it's not using a multi-stage build, go dev tools are clogging up the image, losing the benefit of using alpine in the first place.

https://link.medium.com/S2z0PtVHQ1

If you're just running a go binary you can use distroless as the base for even smaller images.

Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by karlkeefer on Saturday November 23, 2019 @12:52PM (#21615381)
Thanks for linking this. Will implement.

Also like the "tags" within the dockerfile for dev and prod - much cleaner than the multi-file solution currently in the repo.

Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by kjeetgill on Saturday November 23, 2019 @05:21AM (#21613397)
I hadn't heard this before, also sold by small image sizes. What is the big performance weakness of mscl vs glibc?

Anything beyond binary size vs shared pages?

Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by the8472 on Saturday November 23, 2019 @07:51AM (#21613854)
glibc has thread-local pools for malloc, afaik musl uses locks.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by arcticfox on Saturday November 23, 2019 @11:28AM (#21614879)
I'm very weak when it comes to stuff at this level but this sounds like it might be something I really want to know. If I want to run Python or Ruby, what is the practical downside to Alpine? Am I understanding correctly that Python or Ruby interpreters built to run on Alpine use musl instead of glibc, and that might have very noticeable performance impacts?

This thread is opening my eyes, I kind of assumed as long as I was running the right version of those interpreters, I was getting more or less the same thing. That feels like a very bad assumption now.

Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by capableweb on Saturday November 23, 2019 @12:59PM (#21615429)
As always when it comes to performance, you should measure the difference yourself and see if it's a switch worth doing for your use case. "very noticeable performance impacts" depends so much on the context that it's hard to answer in a general way.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by jiux on Saturday November 23, 2019 @01:44PM (#21615691)
> also sold by small image sizes.

Out of curiosity, what sold you on this? Has caching of a docker image been considered in this conclusion as well?

Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by kjeetgill on Monday November 25, 2019 @12:52AM (#21625799)
I was just a casual local user, and didn't have any production use of it. At the time, if my memory serves, images easily got into many GB locally. This was before Ubuntu and others had produced smaller official images of their own.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by sidlls on Saturday November 23, 2019 @12:47PM (#21615341)
Alpine has problems with its network stack that make it unsuitable for use in some contexts.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by mattacular on Saturday November 23, 2019 @10:04AM (#21614445)
Footprint (ie. of the built container image which must be transferred back and forth to repos) and runtime performance are two different things you may care to optimize differently or not.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by karlkeefer on Saturday November 23, 2019 @12:54PM (#21615395)
Thanks - will update the prod recipe.

I saved hundreds of MB on the front-end images switching to alpine so I want a little alpine crazy :)

Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by jordinl on Saturday November 23, 2019 @05:47AM (#21613486)
Performance of what? Building an image?
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by cyphar on Saturday November 23, 2019 @08:35AM (#21614020)
Runtime performance. Musl has different performance characteristics to glibc (glibc uses thread-local pools for malloc, while musl uses locks).
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by atomi on Saturday November 23, 2019 @08:50AM (#21614082)
> Starting with 1.1.9, musl’s dlerror state is thread-local and now matches the glibc behavior.

https://wiki.musl-libc.org/functional-differences-from-glibc...

Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by NieDzejkob on Saturday November 23, 2019 @10:09AM (#21614469)
dlerror is entirely irrelevant here.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by atomi on Saturday November 23, 2019 @11:34AM (#21614903)
In terms of what? Performance? Musl is more correct. Most people aren't serving Google or Facebook levels of requests. My only issue is with people choosing software purely based on performance.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by NieDzejkob on Monday November 25, 2019 @02:18PM (#21631679)
No, it's just that dlerror and malloc are two different functions.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by atomi on Wednesday November 27, 2019 @03:10PM (#21651575)
I think that's self-evident, thank you.
Re:Show HN: PNGR – Docker-compose for a Postgres-Nginx-Golan... by zapita on Saturday November 23, 2019 @01:18PM (#21615556)
musl libc has been robust and fast in my experience. What performance issues have you encountered?