A tool to optimize VMware virtual machines for maximum performance using industry-standard best practices.
- GRUB Boot Parameters: Optimizes kernel boot parameters for VMware environments
- Sysctl Tuning: Configures kernel parameters for memory, network, and I/O performance
- Filesystem Optimization: Updates /etc/fstab with performance-oriented mount options
- I/O Scheduler: Configures optimal I/O schedulers for virtual disks
- Network Tuning: Optimizes network interface settings for vmxnet3 drivers
- Automatic Backups: All changes are backed up with rollback capability
- Dry Run Mode: Preview changes before applying them
- Linux system running on VMware (tested on Debian/Ubuntu)
- Root/sudo access
- Go 1.21 or higher (for building from source)
# Clone repository
git clone https://github.com/dtouzeau/vmware-tuner.git
cd /vmware-tuner
go mod download
go build -o vmware-tuner
sudo mv vmware-tuner /usr/local/bin/git clone https://github.com/dtouzeau/vmware-tuner.git
go build -ldflags="-s -w" -o vmware-tunersudo vmware-tunersudo vmware-tuner --dry-runsudo vmware-tuner showsudo vmware-tuner verifySkip specific modules:
# Skip GRUB tuning (no reboot required)
sudo vmware-tuner --no-grub
# Skip network tuning
sudo vmware-tuner --no-network
# Combine multiple flags
sudo vmware-tuner --no-grub --no-networkelevator=noop- Optimal I/O scheduler for VMstransparent_hugepage=madvise- Reduce memory fragmentationclocksource=tsc- Use TSC for timekeepingintel_idle.max_cstate=0- Disable deep C-states for lower latency- And more...
vm.swappiness=10- Reduce swap usagevm.dirty_ratio=15- Optimize dirty page flushingnet.ipv4.tcp_congestion_control=bbr- Better TCP throughput- Enhanced network buffer sizes
- File system optimizations
noatime- Don't update access times (30% less I/O)nodiratime- Don't update directory access timescommit=60- Reduce sync frequency- Removes
discardoption (not supported by VMware)
- Sets
none/noopscheduler for all virtual disks - Increases queue depth to 256
- Optimizes read-ahead to 256KB
- Increases ring buffers (RX/TX: 4096)
- Enables hardware offloading (GSO, GRO, TSO)
- Optimizes interrupt coalescing
All changes are backed up to /root/.vmware-tuner-backups/<timestamp>/
cd /root/.vmware-tuner-backups/<timestamp>
sudo bash rollback.shcd /root/.vmware-tuner-backups/<timestamp>
sudo cp fstab /etc/fstab
sudo cp grub /etc/default/grub
sudo update-grubChanges that require a reboot:
- GRUB boot parameters
- Filesystem mount options (if remount fails)
Changes applied immediately:
- Sysctl parameters
- I/O scheduler (for current devices)
- Network settings
Expected improvements:
- I/O Performance: 15-30% improvement for sequential operations
- Network Throughput: 10-20% improvement for high-bandwidth workloads
- Latency: Reduced CPU idle latency, faster response times
- Memory: Better cache retention, reduced swapping
- All changes are reversible
- Dry run mode available
- Automatic backups created
- VMware detection (warns if not running on VMware)
- Root check (prevents accidental runs)
Tested on:
- Debian 12 (Bookworm)
- Ubuntu 22.04/24.04
- VMware ESXi 6.x/7.x/8.x
Should work on any modern Linux distribution running on VMware.
If you see warnings about BBR:
# Check available congestion control algorithms
sysctl net.ipv4.tcp_available_congestion_control
# Load BBR module (if available)
sudo modprobe tcp_bbr
echo "tcp_bbr" | sudo tee -a /etc/modulesIf filesystem remount fails, changes will take effect on next boot.
Network tuning service may fail if interfaces are not ready. Changes will apply on next boot.
Edit the source files to customize:
grub.go- Boot parameterssysctl.go- Kernel parametersfstab.go- Mount optionsscheduler.go- I/O settingsnetwork.go- Network settings
Then rebuild:
go build -o vmware-tunerThis tool is provided as-is for VMware VM optimization purposes.
Developed for optimizing VMware virtual machines based on industry best practices and VMware performance tuning guides.