⚙️ Server configuration — best practices podle workloadu
Obecná BIOS/UEFI nastavení
| Nastavení |
Doporučení |
Zdůvodnění |
| Boot mode |
UEFI |
Secure Boot, GPT, větší disky |
| Power profile |
Performance / OS Control |
Max výkon, C-States disabled |
| Hyper-Threading |
Enabled |
+30-50 % throughput pro multi-thread |
| Virtualization |
Enabled (VT-x/AMD-V) |
Nutné pro hypervisor, containers |
| SR-IOV |
Enabled |
GPU, NIC passthrough |
| NUMA |
Enabled |
NUMA-aware scheduling |
| ACPI |
Enabled |
Power management, OS-level |
| Security Boot |
Enabled |
Secure boot chain |
| TPM |
Enabled |
Measured boot, key storage |
1. Databázové servery
Volba CPU
| DB typ |
CPU preference |
Zdůvodnění |
| OLTP (PostgreSQL, MySQL) |
High clock, moderate cores |
Nízká latence na transakci, limited parallelism |
| OLAP (ClickHouse, Snowflake) |
Many cores, AVX-512 |
Columnstore, high parallelism |
| In-memory (Redis, Memcached) |
High clock, low cache latency |
Single-threaded (Redis), RAM bandwidth |
| Document (MongoDB) |
Balance (clock × cores) |
Mixed workload |
| Distributed (Cassandra, Scylla) |
Many cores, high cache |
Shard-per-core (Scylla), compaction |
Storage layout
PostgreSQL specific
| Parametr |
Doporučení |
Poznámka |
shared_buffers |
25 % RAM |
Cache databázových bloků |
effective_cache_size |
75 % RAM |
Odhad OS cache pro query planner |
work_mem |
4-64 MB per operation |
SORT, HASH JOIN (correlate s max_connections) |
maintenance_work_mem |
1-10 % RAM |
VACUUM, CREATE INDEX, ANALYZE |
wal_buffers |
64-256 MB |
Write-ahead log buffer |
max_connections |
50-500 |
Connection pooling (PgBouncer) |
random_page_cost |
1.1 (NVMe), 4 (HDD) |
Index scan cost (NVMe = téměř seq scan) |
effective_io_concurrency |
200 (NVMe), 2 (HDD) |
Parallel I/O |
MySQL / MariaDB specific
| Parametr |
Doporučení |
Poznámka |
innodb_buffer_pool_size |
70-80 % RAM |
Hlavní cache InnoDB |
innodb_log_file_size |
1-4 GB |
Redo log, čím větší tím lepší write perf |
innodb_flush_log_at_trx_commit |
1 (ACID) / 2 (perf) |
1 = fsync každou transakci |
innodb_io_capacity |
2000 (NVMe) / 200 (HDD) |
IOPS limit |
innodb_write_io_threads |
4-8 |
Parallel write threads |
max_connections |
100-500 |
Connection pooling doporučen |
MongoDB specific
| Parametr |
Doporučení |
Poznámka |
| WiredTiger cache |
50-80 % RAM |
Storage engine cache |
| WiredTiger compression |
Snappy / Zstd |
Komprese disku (zlib je pomalý) |
filesystem |
XFS |
Doporučený FS (ext4 OK, NTFS ne) |
| ReadConcern/WriteConcern |
majority/majority |
Pro důležitá data |
Kernel tuning pro DB
2. Hypervisor host (ESXi / KVM / Hyper-V)
CPU a NUMA
| Nastavení |
Doporučení |
Poznámka |
| Overcommit ratio |
1:1 až 4:1 (vCPU:pCPU) |
Podle workloadu (1:1 DB, 4:1 web) |
| NUMA-aware sizing |
VM ≤ 1 NUMA node |
Cross-NUMA penalty ~1.5-2× latence |
| CPU pinning |
Dedikované VM: ano |
Zamezí context switching |
| C-States |
Disabled (in BIOS) |
Nižší latence, vyšší spotřeba |
| P-State |
OS control / Performance |
HW power management |
| Hyper-Threading |
Enabled |
Více vCPU, watch for noisy neighbor |
Storage pro hypervisor
Network design
| Traffic |
VLAN |
Speed |
NIC teaming |
| Management |
Mgmt VLAN |
1 GbE |
Active/Passive |
| VM traffic |
VM VLANs |
25/100 GbE |
LACP (802.3ad) |
| Storage |
Storage VLAN |
25/100 GbE |
LACP / RDMA |
| vMotion |
vMotion VLAN |
25/100 GbE |
Dedikovaný, multi-NIC |
| FT (Fault Tolerance) |
FT VLAN |
10 GbE |
Dedikovaný, low latency |
BIOS pro hypervisor
| Nastavení |
Hodnota |
Zdůvodnění |
| Hyper-Threading |
Enabled |
Vyšší VM density |
| Virtualization Technology |
Enabled |
VT-x/AMD-V |
| VT-d / IOMMU |
Enabled |
Passthrough, SR-IOV |
| Power Management |
Performance / OS |
Minimalizace latence VM |
| C-States |
Disabled |
Nižší latence VM exit |
| NUMA |
Enabled |
NUMA-aware VM placement |
| SR-IOV |
Enabled |
NIC/GPU virtualizace |
3. Kubernetes node
Node profily
| Role |
CPU |
RAM |
Storage |
Network |
Use case |
| General purpose |
16-32 cores |
64-128 GB |
1× NVMe OS + 1×NVMe local |
Web, API, microservices |
|
| Memory optimized |
32-64 cores |
256-512 GB |
1× NVMe OS + 2×NVMe local |
In-memory cache, DB |
|
| Compute optimized |
64-128 cores |
128-256 GB |
1× NVMe OS |
Batch, CI/CD |
|
| GPU node |
32-64 cores |
512-1024 GB |
1× NVMe OS + 4-8×NVMe local |
AI/ML training, inference |
|
| Storage node |
16-32 cores |
64-128 GB |
4-12× NVMe/SATA (Ceph/Longhorn) |
SDS, persistent volumes |
|
Kernel tuning
Container storage
| Typ |
Doporučení |
Poznámka |
| OS disk |
RAID 1 (2× NVMe) |
Ext4/XFS, 100-200 GB |
| Container runtime image |
RAID 1 (2× NVMe) |
/var/lib/containerd, 200-500 GB |
| Local PV |
Single NVMe |
Raw device, no RAID |
| Rook/Ceph OSD |
Raw NVMe/SATA |
HBA/IT mode, no RAID |
| Longhorn |
Raw NVMe/SATA |
Ext4/XFS per volume |
4. Storage server (Ceph / MinIO / NAS)
Ceph OSD node
| Komponenta |
Doporučení |
Poznámka |
| CPU |
1-2 cores per OSD |
Do 12 OSD na node (24 cores) |
| RAM |
4-8 GB per OSD + OS |
BlueStore cache, 16-64 GB min |
| Network |
2× 25/100 GbE |
Public + Cluster network |
| Storage |
10-12× NVMe/SATA SSD OSD |
HBA/IT mode, žádný RAID |
| OS disk |
2× SATA SSD RAID 1 |
OS, Ceph MON/MGR |
BIOS pro Ceph:
- SATA/NVMe: AHCI/NVMe mode (ne RAID)
- C-States: Disabled (nižší latence OSD)
- NUMA: Enabled
- Power: Performance
MinIO node
| Komponenta |
Doporučení |
| CPU |
8-16 cores (32+ pro erasure coding) |
| RAM |
32-64 GB + 1 GB per 1 TB storage |
| Storage |
4-16× NVMe (direct, no RAID) |
| Network |
2× 25/100 GbE |
| OS |
Ubuntu / RHEL, XFS (pro data) |
NAS (TrueNAS / FreeNAS)
- ZFS: RAID-Z1/Z2/Z3, compression (lz4, zstd), dedup
- ARC cache: 1 GB per 1 TB storage (max 64 GB)
- L2ARC: NVMe cache (optional, read-heavy)
- SLOG: NVDIMM / Optane (sync write, ZIL)
- Network: 2-4× 10/25 GbE LACP
5. Web / API servery
| Parametr |
Doporučení |
| CPU |
High clock, 8-32 cores |
| RAM |
32-128 GB |
| Storage |
2× NVMe RAID 1 (OS + app) |
| OS |
Ubuntu / RHEL, optimized kernel |
| Network |
2× 10/25 GbE (bonding) |
Kernel tuning:
Rychlý decision tree — výběr serveru