Network Optimization Scripts

Scripts for high-performance network tuning and traffic shaping

Network Tuner Script

The Network Tuner script optimizes your network settings for high throughput by adjusting system buffer sizes and configuring the network interface for optimal performance.

Features

Usage

./network-tuning-script.sh [interface]

If no interface is specified, eth1 will be used as the default.

Example

sudo ./network-tuning-script.sh eth0

This will optimize network settings for the eth0 interface.

Details

The script performs the following optimizations:

Download Network Tuner Script

Traffic Shaper Script with Dual PI² Support

The Traffic Shaper script allows you to shape network traffic with asymmetric rate support and optional dual PI² queuing for improved latency under load.

Features

Usage

./traffic_shaper_dq.sh [DOWNLOAD_RATE] [UPLOAD_RATE] [RTT_MS] [DISABLE_DUALPI]

Parameters

Parameter Description Default
DOWNLOAD_RATE Download bandwidth limit (e.g., 100Mbit) 50Mbit
UPLOAD_RATE Upload bandwidth limit (e.g., 20Mbit) Same as download rate
RTT_MS RTT in milliseconds for burst calculation 20ms
DISABLE_DUALPI Set to 1 to disable dual PI² queuing 0 (enabled)

Example 1: Basic Configuration

sudo ./traffic_shaper_dq.sh 100Mbit 20Mbit

This sets download bandwidth to 100Mbit, upload to 20Mbit, with default 20ms RTT and dual PI² queuing enabled.

Example 2: High Latency Network

sudo ./traffic_shaper_dq.sh 50Mbit 10Mbit 100

For a high-latency network with 100ms RTT, this configures appropriate burst sizes automatically.

Example 3: Disable Dual PI² Queuing

sudo ./traffic_shaper_dq.sh 75Mbit 15Mbit 30 1

This disables the dual PI² queuing and uses FIFO queuing instead, with 30ms RTT.

Technical Details

The script performs the following operations:

Note: The dual PI² (Proportional Integral controller) queuing discipline is designed to minimize bufferbloat and maintain low latency even under load. It's particularly useful for interactive applications like gaming or video conferencing.

Download Traffic Shaper Script

Installation

To use these scripts, you need to:

  1. Download the scripts using the links above
  2. Make them executable with: chmod +x script-name.sh
  3. Run them with sudo privileges as shown in the examples

Note: These scripts require root privileges to modify network settings. They are designed for Linux systems with the tc (traffic control) utility installed.

Requirements