Slow Image Loading Speeds

Hello there,

Sorry for being a ghost yesterday, was a hectic day.
Code:
PHP 7.4.20 (cli) (built: Jun  5 2021 17:15:32) ( NTS )


Copyright (c) The PHP Group


Zend Engine v3.4.0, Copyright (c) Zend Technologies


    with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.


    with Zend OPcache v7.4.20, Copyright (c), by Zend Technologies


root@srv1:~# httpd -V | grep 'MPM'


Server MPM:     event

Good morning to you too!
 
Last edited:
Ok lets look at opcache some
Code:
cd /usr/local/directadmin/custombuild
mkdir -p custom/opcache
cp -p configure/opcache/opcache.ini custom/opcache/opcache.ini

then
Code:
nano custom/opcache/opcache.ini

Inside that file make it be these values
Code:
opcache.memory_consumption=384
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=16000
opcache.revalidate_freq=48

Code:
./build opcache
 
also go back to the
Code:
nano /etc/my.cnf

change innodb_log_file_size=1750MB #25% of Buffer pool
to
innodb_log_file_size=896MB #25% of Buffer pool

then
Code:
systemctl restart mysqld

I told you to high of a setting
 
Last edited:
Code:
ps --no-headers -o "rss,cmd" -C php-fpm73 | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'

What is output?
 
Hi there!

Right, I've done all of the above. For clarification, I adjusted the values for the OPcache, keeping some of the other lines, which were not included in your post. The custom opcache.ini file now reads:

INI:
opcache.memory_consumption=384
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=16000
opcache.revalidate_freq=48
opcache.enable_cli=1
opcache.validate_permission=1
opcache.use_cwd=1
opcache.revalidate_path=1
opcache.enable_file_override=1

If you meant for me to completely remove the other lines, I'll do that.

The rest of the above has been completed, and the output is:

Code:
root@srv1:/# ps --no-headers -o "rss,cmd" -C php-fpm73 | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'
awk: cmd. line:1: fatal: division by zero attempted
 
@bdacus01 - Just wanted to let you know, that the changes were applied to both of my servers, including the one that the original screenshot with loading times was taken, and page load went from 33 seconds to 3.16.. that's a pretty decent improvement, I'd say!
Screenshot 2021-06-09 at 14.06.27.png
 
Sounds good! I've got a bit more free time today, so I'll aim to be more responsive than over the past few days.
 
PHP 7.4.20 (cli) (built: Jun 5 2021 17:15:32) ( NTS )
You are using php 7.4 not 7.3
Please use this cmd. Also maybe one of you server are not on 7.4?
Code:
ps --no-headers -o "rss,cmd" -C php-fpm74 | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'
 
Good catch!
Code:
root@srv1:~# ps --no-headers -o "rss,cmd" -C php-fpm74 | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'
115M

I also have PHP 8 installed, but no sites are using it at the moment.
 
I also have PHP 8 installed, but no sites are using it at the moment.
I wouldn't recommend you use it currently. Unless it's a test or play server.

If everyone can run on 7.4 I would put everyone on the same version.

Ok what is
Code:
cd /usr/local/directadmin
./directadmin c |grep php_fpm_max_children_default
 
Code:
./directadmin c |grep php_fpm_max_children_default
php_fpm_max_children_default=30

I set this value, because I was having issues (max children reached, consider raising it).
 
php_fpm_max_children_default=30

Yeah that is about right for your server.
But we are going to change it up some more. Currently the DA system user ondemand as a php-fpm Process Management we want to switch to dynamic. There are 3 types ondemand, dynamic and Static.
Ondemand is for Lower memory servers
Static is for High memory/ dedicated server
Dynamic is best of both.
 
ok do
Sass:
service php-fpm74 restart
now do
Code:
ps --no-headers -o "rss,cmd" -C php-fpm74 | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'
What is this number?

Then wait 10 min and only run the ps command again?
Code:
ps --no-headers -o "rss,cmd" -C php-fpm74 | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'
Whats it that number?

if you are wondering we are looking for an average.
 
Closer to 15 mins, but this is the output:

Code:
root@srv1:/usr/local/directadmin# ps --no-headers -o "rss,cmd" -C php-fpm74 | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'
96M
root@srv1:/usr/local/directadmin# ps --no-headers -o "rss,cmd" -C php-fpm74 | awk '{ sum+=$1 } END { printf ("%d%s\n", sum/NR/1024,"M") }'
190M
 
Sorry I have been absent. I wasn't sure if you would want do anything with the upgrade coming out last night.
 
Back
Top