Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHP docker configuration #7

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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