Conversation
| if [ -z "${MIMALLOC}" ]; then | ||
| MIMALLOC=1 | ||
| fi |
There was a problem hiding this comment.
I chose to go this route so that people using the static builder themselves also get mimalloc by default. Other option was to change the default in our matrix.
dunglas
left a comment
There was a problem hiding this comment.
Maybe could we also enable mimalloc in our Docker images too, or explain how to use it with Docker in the docs?
| docker cp $(docker create --name static-builder-musl dunglas/frankenphp:static-builder-musl):/go/src/app/dist/frankenphp-linux-$(uname -m) frankenphp ; docker rm static-builder-musl | ||
| ``` | ||
|
|
||
| For better performance in heavily concurrent scenarios, consider using the [mimalloc](https://github.com/microsoft/mimalloc) allocator. |
There was a problem hiding this comment.
Maybe explain now to disable it instead?
Since the Docker images link against musl dynamically, the way to use mimalloc there would be the same as with glibc (installing mimalloc and setting LD_PRELOAD). I shall document that after I get at least two prototypes for the cli rework in php-src done. |
|
I wonder if just adding some docs for Docker images wouldn't be better? This makes the images slimmer while allowing users to choose. |
|
Also mimalloc seems faster even for Debian images, so we could add docs for Debian too. |
|
I'd prefer to keep the default the same everywhere (per OS), so if we go that route we shouldn't change the static images, either. For glibc I don't think the benefit is large enough to justify the extra package, modern glibc allocators are not so bad. |
|
TBH I would prefer keeping the default allocator by default then. Maybe we could just add docs? |
|
I don't think we really need to do anything here, as musl's weakness was already described (and that using mimalloc can help the threaded issues). |
Thank ctrl + shift + F.
closes #2246