Slow Image Loading Speeds

Then wait I shall, if something were to go wrong, I wouldn't be able to solve it right now, as I'll be on limited availability for the next week.
 
Okay! I see you're involved in the discussions around the upgrade, so for now, let's put a hold on my server changes. When you feel you have a few spare mins, drop the next few commands / steps here, and I'll follow along.

It's almost midnight here, so I will log off now, but thanks again for the support!
 
ok go here
Code:
cd /usr/local/directadmin/data/templates/custom
nano php-fpm.conf

## Add the below in the file
Code:
|?PHP_VER=54|
|?OPEN_BASEDIR_PATH=`HOME`/:/tmp/:/var/tmp/:/opt/alt/php`PHP1_RELEASE`/usr/share/pear/:/dev/urandom:/usr/local/php`PHP_VER`/lib/:`ACTIVE_USR_LOCAL_PHP_LIB`:/usr/local/lib/php/|
|?EMAIL=`USER`@`DOMAIN`|

|CUSTOM1|

[|USER|]
user = $pool
group = $pool

listen = /usr/local/php|PHP_VER|/sockets/$pool.sock
listen.owner = $pool
listen.group = |SERVER_GROUP|
listen.mode = 660

pm = dynamic
pm.max_children = 30
pm.start_servers = 5
pm.min_spare_servers = 2
pm.max_spare_servers = 5
pm.max_requests = 100

php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f |EMAIL|

|*if PHP_SESSION_SAVE_PATH!=""|
php_admin_value[session.save_path] = |PHP_SESSION_SAVE_PATH|
|*endif|

|*if OPEN_BASEDIR="ON"|
php_admin_value[open_basedir] = |OPEN_BASEDIR_PATH|
|*endif|
|*if PHP_MAIL_LOG_ENABLED="1"|
php_admin_value[mail.log] = |PHP_MAIL_LOG_DIR|/php-mail.log
|*endif|

|*if LIMIT_EXTENSIONS!=""|
security.limit_extensions = |LIMIT_EXTENSIONS|
|*endif|


|CUSTOM2|

then do
Code:
./build rewrite_confs

also check if php restarted
Code:
systemctl status php-fpm74

What we are doing is switching all users to Dynamic PM for PHP

Based on you server and memory this should be good.

If you have issues just delete the file and reissue

Code:
./build rewrite_confs

also check if php restarted
Code:
systemctl status php-fpm74
 
Last edited:
Done and done.

Small adjustment needed, as I had to run:

Code:
cd /usr/local/directadmin/custombuild
before
Code:
./build rewrite_confs

Also, on my secondary server, it appears as though there was not a "custom" folder, so had to make that first.

Otherwise, all good.

Output:


Code:
root@srv1:~# systemctl status php-fpm74
● php-fpm74.service - The PHP FastCGI Process Manager
     Loaded: loaded (/etc/systemd/system/php-fpm74.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2021-06-11 21:50:15 EEST; 5min ago
    Process: 2981 ExecReload=/bin/kill -USR2 $MAINPID (code=exited, status=0/SUCCESS)
   Main PID: 736 (php-fpm74)
     Status: "Processes active: 0, idle: 15, Requests: 235, slow: 0, Traffic: 0.8req/sec"
      Tasks: 16 (limit: 19109)
     Memory: 1.6G
     CGroup: /system.slice/php-fpm74.service
             ├─ 736 php-fpm: master process (/usr/local/php74/etc/php-fpm.conf)
             ├─4199 php-fpm: pool alrnetwork
             ├─4209 php-fpm: pool alrnetwork
             ├─4220 php-fpm: pool alrnetwork
             ├─4221 php-fpm: pool alrnetwork
             ├─4222 php-fpm: pool alrnetwork
             ├─4223 php-fpm: pool alrnetwork
             ├─4225 php-fpm: pool burnspla
             ├─4228 php-fpm: pool burnspla
             ├─4235 php-fpm: pool burnspla
             ├─4236 php-fpm: pool burnspla
             ├─4238 php-fpm: pool burnspla
             ├─4245 php-fpm: pool termopan
             ├─4250 php-fpm: pool termopan
             ├─4258 php-fpm: pool tablawro
             └─4260 php-fpm: pool tablawro

Jun 11 21:50:15 srv1.alr-network.co.uk systemd[1]: Starting The PHP FastCGI Process Manager...
Jun 11 21:50:15 srv1.alr-network.co.uk systemd[1]: Started The PHP FastCGI Process Manager.
Jun 11 21:51:01 srv1.alr-network.co.uk systemd[1]: Reloading The PHP FastCGI Process Manager.
Jun 11 21:51:01 srv1.alr-network.co.uk systemd[1]: Reloaded The PHP FastCGI Process Manager.
 
Actually, in this case, it slowed down by almost 66% compared to the previous test. On this server, there's only one website hosted.
 

Attachments

  • Screenshot 2021-06-11 at 22.29.23.png
    Screenshot 2021-06-11 at 22.29.23.png
    481.8 KB · Views: 45
Ran a speedtest from the server to double check that there's not an issue with bandwidth. Appears fine.


Code:
root@kvm1:~# speedtest

   Speedtest by Ookla

     Server: KamaTera INC - New Jersey, NJ (id = 11612)
        ISP: tzulo
    Latency:    17.97 ms   (0.05 ms jitter)
   Download:   879.74 Mbps (data used: 986.8 MB)                               
     Upload:   897.95 Mbps (data used: 976.9 MB)                               
Packet Loss: Not available.
 Result URL: https://www.speedtest.net/result/c/5f7ee191-0b8b-4ad1-ab7d-d5c7890d99fa
 
Rebooted the server, for good measure. Left it for a few moments and monitored CPU etc. When it was "relaxed" I decided to re-load the page (browser cache disabled and using Incognito)

Page load time, 14.00s.. pretty bad.
Screenshot 2021-06-11 at 22.38.15.png

Again, seems to get hung up on the images. The same images, that in test earlier this week, ran fine.

1623440374568.png
 
Yes, that got it back to normal.


Screenshot 2021-06-11 at 22.44.57.png

Interesting. I wonder what caused that to suddenly go a lot slower? What it does do, is reassure me that it's a simple configuration issue, and not general performance.
 
Sorry, might be being dense here..

I've deleted the file and ran the rewrite_configs again. Did you want for me to copy and paste the same config into the custom file and THEN rewrite_configs? or was the intention to basically rewrite the configuration, without the custom file?
 
Last edited:
ok well delete the file and rewrite again like before so there is no file.

I get 1.5 s here in USA btw.
 
Back
Top