Performance Optimizations
Optimizing MocaccinoOS for enhanced performance.
MocaccinoOS includes optimized system and network settings to improve performance. These tweaks enhance networking, memory management, and filesystem efficiency.
- Some settings are enabled by default.
- Additional examples are provided for users who want further customization.
- Changes persist after reboot but are overwritten on system updates.
- To make changes permanent, users must create /etc/sysctl.d/99-custom.conf.
Default Optimizations (Already Enabled)
FQ (Fair Queuing) for reduced bufferbloat:
1
|
net.core.default_qdisc=fq
|
BBR congestion control for low latency:
1
|
net.ipv4.tcp_congestion_control=bbr
|
Memory Management Optimizations
Reduce swap usage for better responsiveness:
Prevent stutters by optimizing disk writeback:
1
2
|
vm.dirty_ratio=20
vm.dirty_background_ratio=5
|
1
|
vm.vfs_cache_pressure=50
|
Filesystem & Process Optimizations
Improve file monitoring (for IDEs, Docker, game engines):
1
2
|
fs.inotify.max_user_watches=524288
fs.inotify.max_user_instances=1024
|
Customizing TCP Buffer Sizes
MocaccinoOS provides example settings for different workloads.
Warning
Only one of these should be used at a time!
Low Latency (Gaming, Video Calls)
1
2
3
4
|
net.core.rmem_max=4194304
net.core.wmem_max=4194304
net.ipv4.tcp_rmem=4096 87380 4194304
net.ipv4.tcp_wmem=4096 16384 4194304
|
High Bandwidth (File Transfers, Streaming)
1
2
3
4
|
net.core.rmem_max=16777216
net.core.wmem_max=16777216
net.ipv4.tcp_rmem=4096 87380 16777216
net.ipv4.tcp_wmem=4096 65536 16777216
|
Copy the settings into /etc/sysctl.d/99-custom.conf
to make them permanent.
Adjusting vm.max_map_count (Advanced Users)
The default vm.max_map_count=65530
works for most users. Some applications (Elasticsearch, game engines, AI tools) may need a higher limit.
Example: Increase to 262144 for database workloads:
1
2
|
echo "vm.max_map_count=262144" >> /etc/sysctl.d/99-custom.conf
sysctl --system
|
Recommended Values:
- Default Linux: 65530
- Elasticsearch & Databases: 262144
- High-performance workloads: 1048576+
The game Dayz requires 1048576
How to Apply Changes
After modifying /etc/sysctl.d/99-custom.conf
, apply changes immediately:
To verify a setting:
1
|
sysctl net.ipv4.tcp_congestion_control
|
FAQ
Q: What happens if I edit /usr/lib/sysctl.d/70-mocaccino.conf?
⚠ Do NOT edit this file! It will be overwritten when the system updates.
Instead, create /etc/sysctl.d/99-custom.conf
.
Q: How do I check my current TCP congestion control?
1
|
sysctl net.ipv4.tcp_congestion_control
|
Q: How do I restore the default settings?
Simply delete your /etc/sysctl.d/99-custom.conf
file and run:
Summary
✔ MocaccinoOS includes performance optimizations by default
✔ Users can test additional tweaks by uncommenting settings in 70-mocaccino.conf
✔ To make changes permanent, users must use /etc/sysctl.d/99-custom.conf
Last modified March 23, 2025:
Update usage.md (2beb46a)