===== CAPACITY & SQL TUNING SNAPSHOT =====
Mon Nov 10 09:45:47 EET 2025
Host: d3.kareklas.gr

== CPU / CORES / LOAD ==
Cores: 76
LoadAvg(1/5/15): 32.75 31.54 28.04

== MEMORY & SWAP ==
              total        used        free      shared  buff/cache   available
Mem:           68Gi        25Gi       4.7Gi       1.5Gi        38Gi        40Gi
Swap:         7.7Gi       4.4Gi       3.3Gi

MemTotal_GB: 68.3
SwapUsed_MB: 4498.75

== PHP-FPM WORKERS (RSS) ==
Assumed avg PHP child RSS: 123.5 MB

== MYSQL / INNODB EFFECTIVENESS ==
innodb_buffer_pool_size (current): 0.1 GB
BufferPool read requests: 130619390833   physical reads: 429852250   hit_ratio: 0.9967

== CAPACITY ESTIMATES (30–40 heavy sites) ==
OS reserve: 6 GB
Recommended InnoDB buffer pool target: 0.1 GB (current 0.1 GB)
Estimated RAM available for PHP workers: 62.2 GB
Total concurrent PHP workers you can support (memory-bound): ~515
If 30 heavy sites: suggest pm.max_children ≈ 17 per site (start here, then tune).
If 40 heavy sites: suggest pm.max_children ≈ 12 per site (start here, then tune).

== QUICK SQL KNOBS (what to raise if needed) ==
- innodb_buffer_pool_size: set to 0.1G (restart required).
- innodb_buffer_pool_instances: 8   (if pool >= 8G).
- table_open_cache: 64000 (plus table_open_cache_instances=16).
- innodb_log_file_size: 2048M–4096M (bigger redo -> steadier writes).
- tmp_table_size & max_heap_table_size: 128M (to reduce disk temp tables).
- Ensure slow_query_log=1 and long_query_time=1 (to catch index misses).

== WHAT THESE NUMBERS MEAN (cheatsheet) ==
* If hit_ratio < 0.995 and PR is growing fast -> buffer pool too small (raise it).
* If load >> cores but Threads_running is modest -> PHP concurrency too high (cap per-site).
* If swap used keeps climbing -> lower pm.max_children or add RAM.
* If temp tables & Sort_* are high in slow log -> add composite indexes.
