Skip to content

Fix PHP docker configuration#7

Open
therealgaxbo wants to merge 4 commits intoomertuc:mainfrom
therealgaxbo:main
Open

Fix PHP docker configuration#7
therealgaxbo wants to merge 4 commits intoomertuc:mainfrom
therealgaxbo:main

Conversation

@therealgaxbo
Copy link

The previous config piped all fizzbuzz output from the container to the host. This is inherently slow, but as docker logs all stdout by default it's glacial. Instead, run pv inside the container.

To make docker play well with score.py I had to trap the script exiting and manually docker kill the container - perhaps there's a better way?

Also changed the image to use a regular (non ZTS) php build, and enable the JIT compiler.

Piping the fizzbuzz output to the host for measurement is bad for
performance, especially as by default every line will also go to
journald.
ZTS builds are only needed when running in a multithreaded SAPI and have
a performance penalty.
The docker container runs in its own process group so score.py does not
kill it.  Work around this by trapping EXIT and killing the container
directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant