LinuxCommandLibrary

trickle

TLDR

Limit download speed of a command

$ trickle -d [100] [command]
copy
Limit upload speed of a command
$ trickle -u [50] [command]
copy
Limit both download and upload
$ trickle -d [100] -u [50] [command]
copy
Run in standalone mode
$ trickle -s -d [100] -u [50] [command]
copy
Limit wget download speed
$ trickle -d [200] wget [https://example.com/file.iso]
copy
Limit scp transfer speed
$ trickle -d [50] -u [50] scp [file] [user@host:/path]
copy

SYNOPSIS

trickle [options] command [args]

DESCRIPTION

trickle is a lightweight userspace bandwidth shaper that limits network bandwidth consumption of individual applications. It works without root privileges or kernel modifications by intercepting socket calls.
The tool uses preloading (LD_PRELOAD) to inject bandwidth limiting into dynamically linked applications. In standalone mode (-s), each application gets its own bandwidth limits. When trickled daemon is running, bandwidth can be shared among multiple applications.
Use cases include preventing a single download from saturating your connection, testing application behavior under low bandwidth, and fair bandwidth allocation among processes.

PARAMETERS

-d rate

Limit download bandwidth to rate KB/s.
-u rate
Limit upload bandwidth to rate KB/s.
-s
Run in standalone mode, independent of trickled.
-w length
Peak detection window size in KB (default: 512).
-t seconds
Smoothing time interval in seconds.
-l length
Smoothing length in KB.
-n path
trickled socket path (default: /tmp/.trickled.sock).
-v
Increase verbosity level.
-V
Display version information.
-h
Display help.

CAVEATS

Only works with dynamically linked executables using TCP sockets. Does not work with statically linked or setuid programs. UDP traffic is not affected. Standalone mode uses fixed limits; daemon mode allows shared limits.

HISTORY

trickle was developed by Marius Aamodt Eriksen as a simple solution for application-level bandwidth limiting. It provides an alternative to complex traffic control solutions like tc, working entirely in userspace without system-wide configuration.

SEE ALSO

trickled(8), tc(8), wondershaper(8), nethogs(8)

Copied to clipboard