-
-
Notifications
You must be signed in to change notification settings - Fork 893
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
Docker image alternative using Ubuntu #2205
Conversation
Ubuntu seems to be faster, cf. e.g. PHPBench on: https://www.phoronix.com/scan.php?page=article&item=freebsd-12-windows&num=5 https://www.phoronix.com/scan.php?page=article&item=docker-summer-2018&num=4 This image is also different from our Alpine-based image as it is using Apache Event and PHP-FPM as FastCGI. They is also supposed to be faster for some types of workload than mod_php but with other drawbacks (poorer control of flush, more processes running...). So some concreate performance tests would be needed to check whether this is relevant at all. It is quite usual for Docker images to offer both a Debian/Ubuntu and an Alpine version, so we could also do the same if there is any need. Follow-up of FreshRSS#2202
Fix double-logging issue
Default Apache configuration in Ubuntu, which was removed when disabling all confs. It is also the default Apache configuration in Alpine.
Same than for Alpine FreshRSS@43ab629
The Ubuntu version (with php-fpm) of our Docker image seems to be about 3 times faster than the Alpine version (with php-mod). That is probably significant enough to care. Additional tests are needed to distinguish the Alpine vs. Ubuntu from the mod-php vs. php-fpm. Details:Tests done with Apache Bench from local network with the system running on a Raspberry Pi 3B+, comparing our Alpine (using mod_php) image with this Ubuntu one (using php-fpm). Using SQLite, HTTP authentication, and FreshRSS configured to return 32 articles per page. Otherwise default settings of everything else. Protocol: run
Raw data:Alpine mod-php
Ubuntu php-fpm
|
I am finally finding time to do additional performance testing, this time comparing 3 variants:
Done on a new FreshRSS version and new database content, still on Raspberry Pi 3 B+. First results with only 1000 requests, to quickly confirm the findings from previous tests: The Alpine version is about 3 times slower than the Ubuntu version. There does not seem to be a big difference between Ubuntu mod-php and Ubuntu php-fpm, so I will run again the tests with 10k requests for a better precision. Raw dataAlpine mod-php
Ubuntu mod-php
Ubuntu php-fpm
|
I still find the difference astounding. Does Alpine ship a more vanilla Apache and/or PHP configuration or something? |
@Frenzie Indeed, I am also quite surprised. Independent tests by phoronix.com (see links in first comment) are also showing big differences in the same direction (although not as much as what I am observing here). The Apache + PHP configurations should be extremely similar between the two images. On the one hand is Ubuntu known to be very well optimised for speed, and on the other hand is Alpine focusing on a small footprint with a musl libc that is producing smaller but sometimes less speedy binaries. We should reproduce the tests on another CPU architecture such as AMD64. |
On Raspberry Pi 3B+, Ubuntu mod-php wins, being ~14% faster than Ubuntu php-fpm (which was ~300% faster than Alpine mod-php). Maybe this could be partially due to the fact that php-fpm does not support Raw dataUbuntu mod-php
Ubuntu php-fpm
|
FreshRSS#2205 (And removed proxy_fcgi forgotten from php-fpm)
#2205 (And removed proxy_fcgi forgotten from php-fpm)
FreshRSS#2495 (comment) https://php.net/ref.opcache We need to retest the performances FreshRSS#2205
#2495 (comment) https://php.net/ref.opcache We need to retest the performances #2205
* Docker image alternative using Ubuntu Ubuntu seems to be faster, cf. e.g. PHPBench. It is quite usual for Docker images to offer both a Debian/Ubuntu and an Alpine version, so we could also do the same if there is any need. Follow-up of FreshRSS#2202 * Only explicit use of Apache confs Fix double-logging issue * Explicit ServerTokens OS Default Apache configuration in Ubuntu, which was removed when disabling all confs. It is also the default Apache configuration in Alpine. * Take advantage of syslog for actualization Same than for Alpine FreshRSS@43ab629 * COPY_SYSLOG_TO_STDERR Same as FreshRSS#2213 * Update to libapache2-mod-php instead of php-fpm * Default to Ubuntu Ubuntu mod-php wins, being ~14% faster than Ubuntu php-fpm (which was ~300% faster than Alpine mod-php)
FreshRSS#2205 (And removed proxy_fcgi forgotten from php-fpm)
FreshRSS#2495 (comment) https://php.net/ref.opcache We need to retest the performances FreshRSS#2205
* Docker image alternative using Ubuntu Ubuntu seems to be faster, cf. e.g. PHPBench. It is quite usual for Docker images to offer both a Debian/Ubuntu and an Alpine version, so we could also do the same if there is any need. Follow-up of FreshRSS#2202 * Only explicit use of Apache confs Fix double-logging issue * Explicit ServerTokens OS Default Apache configuration in Ubuntu, which was removed when disabling all confs. It is also the default Apache configuration in Alpine. * Take advantage of syslog for actualization Same than for Alpine FreshRSS@43ab629 * COPY_SYSLOG_TO_STDERR Same as FreshRSS#2213 * Update to libapache2-mod-php instead of php-fpm * Default to Ubuntu Ubuntu mod-php wins, being ~14% faster than Ubuntu php-fpm (which was ~300% faster than Alpine mod-php)
FreshRSS#2205 (And removed proxy_fcgi forgotten from php-fpm)
Ubuntu seems to be faster, cf. e.g. PHPBench on:
This image is also different from our Alpine-based image as it is using Apache Event and PHP-FPM as FastCGI. They are also supposed to be faster for some types of workload than mod_php but with other drawbacks (poorer control of flush, more processes running...).
So some concreate performance tests would be needed to check whether this is relevant at all.
It is quite usual for Docker images to offer both a Debian/Ubuntu and an Alpine version, so we could also do the same if there is any need.
Follow-up of #2202