SYSTEM INFORMATION | |
---|---|
OS type and version | Ubuntu Linux 22.04.3 |
Webmin version | [2.202] |
Virtualmin version | 7.30.4 |
Webserver version | [Apache Webserver |
Related packages | SUGGESTED |
PHP-FPM 7.4.33 Server
Database: MariaDB version 10.6.18
procesor Intel(R) Xeon(R) CPU X5650 @ 2.67GHz, 24 miezuri
Virtual memory: 1.35 GiB utilizat / 1.99 GiB total
Real memory: 5.09 GiB folosit / 17.85 GiB în cache / 23.49 GiB total
Only i have HDD: 239.38 GiB utilizat / 33.55 GiB liber / 272.93 GiB total
I installed an opencart online store with over 190,000 products and it loads very slowly, more precisely extrastore.ro, but I also have a lenjeriialecasei with 2,000 products, it loads very quickly, what would be the problem with the extrastore.ro site with over 190,000 products.
have /etc/mysql/mariadb.conf.d/50-server.cnf
[mysqld]
pid-file = /run/mysqld/mysqld.pid
basedir = /usr
bind-address = 127.0.0.1
expire_logs_days = 10
character-set-server = utf8mb4
collation-server = utf8mb4_general_ci
innodb_file_per_table = 1
max_allowed_packet = 64M
ssl_ca = /etc/mysql/mysql-ssl.ca
ssl_key = /etc/mysql/mysql-ssl.key
ssl_cert = /etc/mysql/mysql-ssl.cert
myisam_sort_buffer_size = 64M
CACHE & BUFFER OPTIMIZAT
query_cache_size = 64M # Mai mic, deoarece query_cache poate încetini HDD-ul
query_cache_limit = 4M
tmp_table_size = 128M # Reducem pentru a evita scrierea excesivă pe disc
max_heap_table_size = 128M
OPTIMIZARE CONEXIUNI
max_connections = 150 # Limităm conexiunile pentru a preveni consum excesiv de RAM
net_buffer_length = 256K # Buffer optimizat pentru HDD
OPTIMIZARE BUFFER & INDEX
key_buffer_size = 256M # Scădem pentru a reduce solicitările pe HDD
sort_buffer_size = 4M
read_rnd_buffer_size = 4M
join_buffer_size = 4M
OPTIMIZARE INNODB PENTRU HDD
innodb_buffer_pool_size = 8G # Reducem la 8GB pentru a lăsa loc altor servicii
innodb_buffer_pool_instances = 4 # Menținem 4 instanțe pentru echilibrare
innodb_log_file_size = 512M # Reducem pentru a evita latențele la restart
innodb_log_buffer_size = 32M
innodb_flush_log_at_trx_commit = 1 # Mai sigur pentru HDD (evită coruperea datelor)
innodb_flush_method = fsync # Mai potrivit pentru HDD decât O_DIRECT
innodb_read_io_threads = 4 # Limităm citirile pentru HDD
innodb_write_io_threads = 2 # Limităm scrierile pentru HDD
innodb_io_capacity = 200 # Reducem pentru HDD (mai sigur și mai stabil)
innodb_io_capacity_max = 400
innodb_thread_concurrency = 8 # Limităm paralelizarea pentru a evita suprasolicitarea HDD-ului
innodb_autoinc_lock_mode = 2 # Optimizare pentru INSERT rapid
ACTIVARE LOG INTEROGĂRI LENTE
slow_query_log = 1
slow_query_log_file = /var/log/mysql/slow.log
long_query_time = 1 # Loghează interogările mai lente de 1 secunde
log_queries_not_using_indexes = 1
have in /etc/php/7.4/fpm/pool.d/173980717823374.conf
[173980717823374]
user = extrastore
group = extrastore
listen.owner = extrastore
listen.group = extrastore
listen.mode = 0660
listen = /run/php/173980717823374.sock
pm = dynamic
pm.max_children = 30
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 15
php_value[upload_tmp_dir] = /home/extrastore/tmp
php_value[session.save_path] = /home/extrastore/tmp
php_value[memory_limit] = 2G
php_value[max_execution_time] = 3600
php_value[file_uploads] = On
php_value[upload_max_filesize] = 512M
php_value[post_max_size] = 512M
php_admin_value[max_input_time] = 300
php_admin_value[max_input_vars] = 5000