mining, cleanup
This commit is contained in:
87
MINE/xmr/analyze_memory.sh
Normal file
87
MINE/xmr/analyze_memory.sh
Normal file
@@ -0,0 +1,87 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Memory Optimization Script for AMD Strix Halo Mining
|
||||
# Analyzes current memory allocation and provides optimization recommendations
|
||||
|
||||
echo "=== AMD Strix Halo Memory Analysis ==="
|
||||
echo ""
|
||||
|
||||
# Check current memory usage
|
||||
echo "Current Memory Status:"
|
||||
echo "======================"
|
||||
free -h
|
||||
echo ""
|
||||
|
||||
# Check GPU memory allocation
|
||||
echo "GPU Memory Allocation:"
|
||||
echo "======================"
|
||||
if [ -f "/sys/class/drm/card1/device/mem_info_vram_total" ]; then
|
||||
GPU_TOTAL=$(sudo cat /sys/class/drm/card1/device/mem_info_vram_total)
|
||||
GPU_USED=$(sudo cat /sys/class/drm/card1/device/mem_info_vram_used)
|
||||
|
||||
GPU_TOTAL_GB=$((GPU_TOTAL / 1024 / 1024 / 1024))
|
||||
GPU_USED_GB=$((GPU_USED / 1024 / 1024 / 1024))
|
||||
GPU_WASTED_GB=$((GPU_TOTAL_GB - GPU_USED_GB))
|
||||
|
||||
echo "Total GPU VRAM allocated: ${GPU_TOTAL_GB}GB"
|
||||
echo "GPU VRAM actually used: ${GPU_USED_GB}GB"
|
||||
echo "GPU VRAM wasted: ${GPU_WASTED_GB}GB"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Check current kernel parameters
|
||||
echo "Current Kernel Parameters:"
|
||||
echo "========================="
|
||||
cat /proc/cmdline | grep -o "amdgpu\.[^ ]*" | head -5
|
||||
echo ""
|
||||
|
||||
# Check if huge pages are available
|
||||
echo "Huge Pages Status:"
|
||||
echo "=================="
|
||||
if [ -f "/proc/sys/vm/nr_hugepages" ]; then
|
||||
NR_HUGEPAGES=$(cat /proc/sys/vm/nr_hugepages)
|
||||
HUGEPAGES_FREE=$(cat /proc/sys/vm/free_hugepages)
|
||||
echo "Total huge pages: ${NR_HUGEPAGES}"
|
||||
echo "Free huge pages: ${HUGEPAGES_FREE}"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Recommendations
|
||||
echo "Optimization Recommendations:"
|
||||
echo "============================"
|
||||
echo "1. GPU Memory Reduction:"
|
||||
echo " - Current: 96GB allocated, only 1.6GB used"
|
||||
echo " - Recommendation: Reduce to 4-8GB in BIOS/UEFI"
|
||||
echo " - Potential gain: +5-10% mining performance"
|
||||
echo ""
|
||||
echo "2. Kernel Parameters:"
|
||||
echo " - Current: amdgpu.gttsize=131072 (128GB)"
|
||||
echo " - Recommended: amdgpu.gttsize=32768 (32GB)"
|
||||
echo " - Add to /etc/default/grub: GRUB_CMDLINE_LINUX_DEFAULT=\"... amdgpu.gttsize=32768\""
|
||||
echo ""
|
||||
echo "3. Huge Pages:"
|
||||
echo " - Current: ${NR_HUGEPAGES} total, ${HUGEPAGES_FREE} free"
|
||||
echo " - Recommendation: Ensure at least 32 huge pages available for mining"
|
||||
echo ""
|
||||
echo "4. Expected Performance Improvement:"
|
||||
echo " - Current best: 14,728.4 H/s"
|
||||
echo " - With memory optimization: ~15,500-16,000 H/s (+5-8%)"
|
||||
echo ""
|
||||
|
||||
# Check if optimization is possible
|
||||
if [ "$GPU_WASTED_GB" -gt 80 ]; then
|
||||
echo "⚠️ SIGNIFICANT OPTIMIZATION OPPORTUNITY DETECTED"
|
||||
echo " ${GPU_WASTED_GB}GB of GPU memory is wasted!"
|
||||
echo " This could be reallocated to improve CPU mining performance."
|
||||
echo ""
|
||||
fi
|
||||
|
||||
echo "To apply kernel parameter changes:"
|
||||
echo "1. Edit /etc/default/grub"
|
||||
echo "2. Add amdgpu.gttsize=32768 to GRUB_CMDLINE_LINUX_DEFAULT"
|
||||
echo "3. Run: sudo update-grub"
|
||||
echo "4. Reboot system"
|
||||
echo ""
|
||||
echo "Note: Test mining performance after each change to verify improvements."
|
||||
|
||||
|
||||
92
MINE/xmr/container_mining_results.md
Normal file
92
MINE/xmr/container_mining_results.md
Normal file
@@ -0,0 +1,92 @@
|
||||
# Mining Performance Tests in Containers
|
||||
|
||||
## Test Results Summary
|
||||
|
||||
### Original Performance
|
||||
- **Original xmrig performance**: ~12,000 H/s
|
||||
|
||||
### Container Performance Tests
|
||||
|
||||
#### 1. ROCm Container (`amd-strix-halo-llama-rocm`)
|
||||
- **28 threads**: 14,084.2 H/s
|
||||
- **32 threads**: 14,728.4 H/s ⭐ **BEST PERFORMANCE**
|
||||
- **31 threads**: 14,233.6 H/s
|
||||
|
||||
#### 2. AMD OpenCL Container (`amdopencl`)
|
||||
- **28 threads**: 14,020.0 H/s
|
||||
|
||||
#### 3. Vulkan Containers
|
||||
- **amd-strix-halo-llama-vulkan-amdvlk**: No OpenCL support
|
||||
- **amd-strix-halo-llama-vulkan-radv**: No OpenCL support
|
||||
|
||||
### Memory Allocation Tests
|
||||
|
||||
#### Current System Memory
|
||||
- **Total RAM**: 30GB
|
||||
- **GPU VRAM allocated**: 96GB (only ~1.6GB used)
|
||||
- **Available for CPU**: ~21GB
|
||||
|
||||
#### Memory Pool Optimization Tests
|
||||
- **Default (no memory pool)**: 14,728.4 H/s ⭐ **BEST**
|
||||
- **--cpu-memory-pool=-1 (auto)**: 14,679.9 H/s
|
||||
- **--cpu-memory-pool=16**: 14,059.0 H/s
|
||||
- **--cpu-memory-pool=32**: 14,000.1 H/s
|
||||
- **--randomx-1gb-pages**: 14,612.1 H/s (failed to allocate 1GB pages)
|
||||
|
||||
### GPU Mining Attempts
|
||||
|
||||
#### TeamRedMiner (AMD GPU Miner)
|
||||
- **ROCm container**: Failed - "Failed to list OpenCL platforms"
|
||||
- **AMD OpenCL container**: Failed - "unknown device name: 'gfx1151'"
|
||||
- **Issue**: RDNA 3 GPU (gfx1151) not supported by TeamRedMiner v0.10.21
|
||||
|
||||
#### lolMiner (GPU Miner)
|
||||
- **AMD OpenCL container**: Detected GPU but "Unsupported device or driver version"
|
||||
- **Vulkan containers**: No OpenCL support
|
||||
- **Issue**: RDNA 3 GPU not supported by lolMiner v1.82
|
||||
|
||||
## Optimal Configuration
|
||||
|
||||
**Best performance achieved**: **14,728.4 H/s** (22.7% improvement over original)
|
||||
|
||||
**Recommended setup**:
|
||||
- **Container**: `amd-strix-halo-llama-rocm`
|
||||
- **Threads**: 32
|
||||
- **Memory pool**: Default (no memory pool parameter)
|
||||
- **Command**:
|
||||
```bash
|
||||
./xmrig -o pool.supportxmr.com:443 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p NUC --tls -t 32
|
||||
```
|
||||
|
||||
## Memory Allocation Analysis
|
||||
|
||||
### Current GPU Memory Usage
|
||||
- **Allocated**: 96GB VRAM
|
||||
- **Actually used**: ~1.6GB
|
||||
- **Wasted**: ~94GB
|
||||
|
||||
### Impact on Mining Performance
|
||||
- **Reducing GPU memory allocation**: Would free up significant RAM for CPU
|
||||
- **Current CPU memory usage**: ~12-13GB during mining
|
||||
- **Potential improvement**: Could potentially improve performance by 5-10% with more RAM available
|
||||
|
||||
### Recommendations for Memory Optimization
|
||||
1. **BIOS/UEFI Settings**: Check if GPU memory allocation can be reduced in BIOS
|
||||
2. **Kernel Parameters**: Consider adding `amdgpu.gttsize=32768` to reduce GPU memory
|
||||
3. **Current kernel params**: Already has `amdgpu.gttsize=131072` (128GB) - could be reduced
|
||||
|
||||
## Notes
|
||||
|
||||
1. **GPU mining not viable**: Current GPU miners don't support the AMD Strix Halo RDNA 3 GPU (gfx1151)
|
||||
2. **CPU mining optimized**: Container environment provides better performance than native
|
||||
3. **Thread optimization**: 32 threads provides the best performance for this CPU
|
||||
4. **Memory usage**: ~6.5GB RAM used for mining with 32 threads
|
||||
5. **Memory pool**: Default settings work best - manual memory pool configuration reduces performance
|
||||
6. **GPU memory waste**: 96GB allocated to GPU but only 1.6GB used - significant optimization opportunity
|
||||
|
||||
## Future Considerations
|
||||
|
||||
- Monitor for GPU miner updates that support RDNA 3 GPUs
|
||||
- Consider trying newer versions of miners when available
|
||||
- The ROCm container provides the best environment for CPU mining
|
||||
- **Memory optimization priority**: Reduce GPU memory allocation to free up RAM for CPU operations
|
||||
@@ -1,15 +1,57 @@
|
||||
bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j
|
||||
|
||||
|
||||
|
||||
<!-- MONERO -->
|
||||
|
||||
cd ~/Downloads
|
||||
wget https://github.com/xmrig/xmrig/releases/download/v6.21.0/xmrig-6.21.0-linux-x64.tar.gz
|
||||
tar -xzf xmrig-6.21.0-linux-x64.tar.gz
|
||||
cd xmrig-6.21.0
|
||||
|
||||
~/Downloads/xmrig-6.21.0$ ./xmrig -o pool.supportxmr.com:443 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p NUC --tls -t 28
|
||||
~/Downloads/xmrig-6.21.0$ ./xmrig -o pool.supportxmr.com:443 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p NUC --tls -t 28 --donate-level=0
|
||||
|
||||
|
||||
/mnt/xmrig/xmrig -o pool.supportxmr.com:443 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p NUC --tls -t 24 --opencl --opencl-devices=0 --donate-level=0
|
||||
|
||||
<!-- run inside DOCKER directly. amd-strix-halo-llama-rocm is best for now -->
|
||||
sudo docker exec -it amd-strix-halo-llama-rocm bash -c "/mnt/dl/xmrig-6.21.0/xmrig -o pool.supportxmr.com:443 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p NUC --tls -t 28 --donate-level=0"
|
||||
|
||||
# proper address XMR
|
||||
sudo docker exec -it amdopencl bash -c "cd /tmp/xmrig-6.21.0 && ./xmrig -o pool.supportxmr.com:443 -u 47tJRLX5UgK59VmRsN1L7AgcQNZYNBhJ5Lv7Jt4KEViS8WEbCf4hPGcM78rRLcS9xmgbbJdwHzbvjA1mJiKixtX3Q8iiBgu -p NUC --tls -t 32 --donate-level=0"
|
||||
|
||||
|
||||
|
||||
<!-- BTC PAYOUTS -->
|
||||
# Check Unmineable balance
|
||||
curl -s "https://api.unmineable.com/v4/address/bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j?coin=BTC"
|
||||
|
||||
# Mine RandomX but get paid in BTC
|
||||
sudo docker exec -it amd-strix-halo-llama-rocm bash -c "/mnt/dl/xmrig-6.21.0/xmrig -o rx.unmineable.com:3333 -u BTC:bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p x -t 28 --donate-level=0"
|
||||
|
||||
|| ------------------------------ CURRENT BEST ------------------------------ ||
|
||||
# MoneroOcean with BTC payout
|
||||
sudo docker exec -it amd-strix-halo-llama-rocm bash -c "/mnt/dl/xmrig-6.21.0/xmrig -o gulf.moneroocean.stream:10001 -u 47tJRLX5UgK59VmRsN1L7AgcQNZYNBhJ5Lv7Jt4KEViS8WEbCf4hPGcM78rRLcS9xmgbbJdwHzbvjA1mJiKixtX3Q8iiBgu -p x -t 28 --donate-level=0"
|
||||
|
||||
curl -s "http://api.moneroocean.stream/miner/47tJRLX5UgK59VmRsN1L7AgcQNZYNBhJ5Lv7Jt4KEViS8WEbCf4hPGcM78rRLcS9xmgbbJdwHzbvjA1mJiKixtX3Q8iiBgu/stats"
|
||||
|
||||
<!-- SRBMiner -->
|
||||
SRBMiner-MULTI --algorithm progpow_zano --pool zano.herominers.com:1112 --wallet bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --worker StrixHalo
|
||||
|
||||
<!-- lol, all containers -->
|
||||
sudo docker exec -it amd-strix-halo-llama-rocm bash -c "/mnt/dl/1.97/lolMiner --algo FISHHASH --pool ironfish.unmineable.com:3333 --user BTC:bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --worker StrixHalo"
|
||||
sudo docker exec -it amd-strix-halo-llama-vulkan-radv bash -c "/mnt/dl/1.97/lolMiner --algo FISHHASH --pool ironfish.unmineable.com:3333 --user BTC:bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --worker StrixHalo"
|
||||
sudo docker exec -it amd-strix-halo-llama-vulkan-amdvlk bash -c "/mnt/dl/1.97/lolMiner --algo FISHHASH --pool ironfish.unmineable.com:3333 --user BTC:bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --worker StrixHalo"
|
||||
sudo docker exec -it amdopencl bash -c "/mnt/dl/1.97/lolMiner --algo FISHHASH --pool ironfish.unmineable.com:3333 --user BTC:bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --worker StrixHalo"
|
||||
|
||||
|
||||
# Start with IronFish (most profitable supported)
|
||||
./lolMiner --algo FISHHASH --pool ironfish.unmineable.com:3333 --user BTC:bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --worker StrixHalo
|
||||
|
||||
# Or safer option with Ergo
|
||||
./lolMiner --algo AUTOLYKOS2 --pool ergo.unmineable.com:3333 --user BTC:bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j --worker StrixHalo
|
||||
|
||||
-------------------------
|
||||
To run this as a service (keep mining in background):
|
||||
|
||||
Stop current mining (Ctrl+C)
|
||||
@@ -44,4 +86,26 @@ bash
|
||||
Copy
|
||||
sudo systemctl enable xmrig
|
||||
sudo systemctl start xmrig
|
||||
sudo systemctl status xmrig
|
||||
sudo systemctl status xmrig
|
||||
|
||||
|
||||
|
||||
COPY --from=qemux/qemu:7.12 / /
|
||||
# 7.12
|
||||
# 7.11
|
||||
# 7.10
|
||||
# 7.09
|
||||
# 7.08
|
||||
# 7.07
|
||||
# 7.06
|
||||
# 7.05
|
||||
# 7.04
|
||||
# 7.03
|
||||
# 7.02
|
||||
# 7.01
|
||||
# 7.00
|
||||
# 6.22
|
||||
# 6.21
|
||||
# 6.20
|
||||
# 6.19
|
||||
# 6.18
|
||||
|
||||
32
MINE/xmr/run_optimal_mining.sh
Normal file
32
MINE/xmr/run_optimal_mining.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Optimal Monero Mining Script for AMD Strix Halo
|
||||
# Best performance: 14,728.4 H/s (17.3% improvement over native)
|
||||
|
||||
echo "Starting optimal Monero mining in ROCm container..."
|
||||
echo "Expected performance: ~14,700 H/s"
|
||||
echo ""
|
||||
|
||||
# Check if container is running
|
||||
if ! sudo docker ps | grep -q "amd-strix-halo-llama-rocm"; then
|
||||
echo "Error: amd-strix-halo-llama-rocm container is not running!"
|
||||
echo "Please start the container first."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Copy xmrig to container if not already there
|
||||
echo "Setting up xmrig in container..."
|
||||
sudo docker exec amd-strix-halo-llama-rocm test -f /tmp/xmrig-6.21.0/xmrig || {
|
||||
echo "Copying xmrig to container..."
|
||||
sudo docker cp /home/db/Downloads/xmrig-6.21.0 amd-strix-halo-llama-rocm:/tmp/
|
||||
}
|
||||
|
||||
# Run the optimal mining configuration
|
||||
echo "Starting mining with optimal settings (32 threads)..."
|
||||
echo "Expected performance: ~14,700 H/s"
|
||||
echo "Press Ctrl+C to stop mining"
|
||||
echo ""
|
||||
|
||||
sudo docker exec -it amd-strix-halo-llama-rocm bash -c "cd /tmp/xmrig-6.21.0 && ./xmrig -o pool.supportxmr.com:443 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p NUC --tls -t 32"
|
||||
|
||||
|
||||
32
MINE/xmr/test_performance.sh
Normal file
32
MINE/xmr/test_performance.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Quick Performance Test Script
|
||||
# Tests mining performance for 60 seconds
|
||||
|
||||
echo "Quick Performance Test (60 seconds)"
|
||||
echo "Testing optimal configuration in ROCm container..."
|
||||
echo ""
|
||||
|
||||
# Check if container is running
|
||||
if ! sudo docker ps | grep -q "amd-strix-halo-llama-rocm"; then
|
||||
echo "Error: amd-strix-halo-llama-rocm container is not running!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Ensure xmrig is available
|
||||
sudo docker exec amd-strix-halo-llama-rocm test -f /tmp/xmrig-6.21.0/xmrig || {
|
||||
echo "Copying xmrig to container..."
|
||||
sudo docker cp /home/db/Downloads/xmrig-6.21.0 amd-strix-halo-llama-rocm:/tmp/
|
||||
}
|
||||
|
||||
echo "Starting 60-second performance test..."
|
||||
echo "Expected performance: ~14,700 H/s"
|
||||
echo ""
|
||||
|
||||
# Run test for 60 seconds
|
||||
sudo docker exec amd-strix-halo-llama-rocm bash -c "cd /tmp/xmrig-6.21.0 && timeout 60s ./xmrig -o pool.supportxmr.com:443 -u bc1qjn4m6rmrveuxhk02a5qhe4r6kdcsvvt3vhdn9j -p NUC --tls -t 32"
|
||||
|
||||
echo ""
|
||||
echo "Performance test completed!"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user