Add tech_docs/proxmox_lab.md

This commit is contained in:
2024-10-15 16:06:49 +00:00
parent a362b95ce6
commit 3679fef2e0

171
tech_docs/proxmox_lab.md Normal file
View File

@@ -0,0 +1,171 @@
That's excellent! Your experience with Proxmox and LXC containers, along with your additional hardware, opens up even more possibilities for our performance testing lab. Let's adapt our plan to leverage your setup and skills:
1. LXC vs. VM:
LXC containers are indeed more lightweight and efficient. We can use a mix of LXC containers and VMs to compare performance and resource usage.
2. Networking:
With your 4-port PCI NIC and onboard NIC, we can create a more complex and realistic network topology.
3. GPU:
Having two GPUs allows us to experiment with GPU passthrough and its impact on performance.
Let's design an enhanced lab setup:
# Enhanced Performance Testing Lab on Proxmox
## Hardware Utilization
1. Storage:
- 120GB SSD: Proxmox OS
- 500GB SSD: Container and VM storage
2. Network:
- Onboard NIC: Proxmox management
- 4-port PCI NIC:
- Port 1: External network
- Port 2: High-performance test network
- Port 3: Simulated WAN (with traffic shaping)
- Port 4: Storage network
3. GPUs:
- Built-in GPU: Proxmox host
- PCI GPU: Passthrough to a VM for GPU-accelerated workloads
## Container and VM Setup
1. Load Testing (LXC):
- OS: Alpine Linux
- Tools: sysbench, iperf3, Apache Bench
2. Web Servers (LXC):
- Container 1: Nginx on Alpine
- Container 2: Apache on Ubuntu
3. Database Servers:
- LXC 1: PostgreSQL on Ubuntu
- LXC 2: MySQL on Alpine
- VM: MongoDB (to compare VM vs LXC performance)
4. Monitoring (LXC):
- OS: Ubuntu
- Stack: Prometheus, Grafana, InfluxDB
5. Application Servers:
- LXC 1: Node.js on Alpine
- LXC 2: Python on Ubuntu
- VM: Java application server
6. Network Services:
- OpenWRT LXC 1: Edge router / Firewall
- OpenWRT LXC 2: Internal router (for network segmentation)
7. Storage Server (VM):
- TrueNAS Scale (for ZFS and GPU capabilities)
8. GPU Workload (VM):
- Ubuntu with PCI GPU passthrough
- CUDA toolkit and GPU-accelerated applications
## Network Topology
1. Management Network (Onboard NIC):
- Proxmox management
- Out-of-band container/VM management
2. External Network (PCI NIC Port 1):
- Connects to OpenWRT edge router
3. High-Performance Test Network (PCI NIC Port 2):
- Direct connection for performance-critical containers/VMs
4. Simulated WAN (PCI NIC Port 3):
- Connects through OpenWRT internal router
- Apply traffic shaping for realistic internet simulation
5. Storage Network (PCI NIC Port 4):
- Dedicated network for TrueNAS and high-throughput storage tests
## Specialized Test Scenarios
1. Container vs VM Performance:
- Compare identical workloads on LXC vs VM
2. Network Performance:
- Measure throughput and latency across different network segments
- Test OpenWRT routing and firewall performance
3. Storage Performance:
- Compare local SSD vs TrueNAS performance
- Test ZFS tuning impact on performance
4. GPU-Accelerated Workloads:
- Benchmark GPU passthrough performance
- Compare GPU-accelerated vs CPU-only workloads
5. Database Performance:
- Benchmark and tune PostgreSQL, MySQL, and MongoDB
- Compare performance across different storage configs
6. Web Server Optimization:
- Fine-tune Nginx and Apache for high concurrency
- Test with realistic traffic patterns using Apache Bench
7. Application Performance:
- Profile and optimize Node.js, Python, and Java applications
- Test application performance under simulated WAN conditions
8. Resource Contention:
- Create scenarios with competing workloads
- Observe Proxmox's resource allocation and containment
## Monitoring and Analysis
- Use Prometheus for metrics collection from all containers and VMs
- Set up Grafana dashboards for real-time performance visualization
- Implement InfluxDB for long-term trend analysis
- Use OpenWRT's built-in tools for network performance monitoring
This enhanced setup leverages your hardware capabilities and experience with LXC and networking. Here are some ideas to get started:
1. Network Performance Baseline:
- Set up iperf3 servers on different network segments.
- Run tests to establish baseline performance for each network.
- Use OpenWRT to introduce varying levels of latency and packet loss on the simulated WAN.
2. Container vs VM Comparison:
- Deploy identical web server setups (e.g., Nginx) on both an LXC container and a VM.
- Use Apache Bench to load test both setups.
- Compare resource usage, response times, and maximum throughput.
3. Database Tuning:
- Set up PostgreSQL with different storage configurations (local SSD vs TrueNAS).
- Use pgbench to run standardized tests.
- Experiment with PostgreSQL configuration parameters and analyze their impact.
4. GPU Passthrough Performance:
- Set up a VM with GPU passthrough.
- Install CUDA and a GPU-accelerated application (e.g., Blender for 3D rendering).
- Compare rendering times with and without GPU acceleration.
5. Complex Scenario: E-commerce Simulation:
- Use the web servers, application servers, and databases to set up a simulated e-commerce stack.
- Create a realistic load test scenario with Apache Bench or JMeter.
- Monitor performance across all components while running the test.
- Identify bottlenecks and optimize each component.
6. Network Segmentation Impact:
- Use OpenWRT containers to create different network topologies.
- Measure the impact of firewalls and routing on application performance.
7. Storage Performance Deep Dive:
- Compare performance of databases and applications when using local SSD vs TrueNAS.
- Experiment with different ZFS configurations on TrueNAS.
Remember to document all your findings, configurations, and optimizations. This lab setup provides an excellent platform for deep diving into system performance across various scenarios.
Would you like to focus on setting up any specific part of this lab, or shall we discuss some advanced experiments you could run?