fititnt / cplp-aiops

AIOps para Comunidade dos Países de Língua Portuguesa, 2019/01. [Foco atual: servidores comunitário e gratuito para iniciantes em programação e ciência de dados]
The Unlicense
5 stars 0 forks source link

Otimizações iniciais para reduzir uso de banda em conexões via celular e 3G #1

Open fititnt opened 5 years ago

fititnt commented 5 years ago

No caso de desenvolvedores que precisam fazer uso permanente via 3G em servidores, as configurações padrões podem não ser as mais custo-eficiente. Otimizações aqui podem fazer diferença no bolso.

fititnt commented 5 years ago

https://superuser.com/questions/624720/how-much-data-does-ssh-typically-use/1199986#1199986

answered Apr 15 '17 at 16:01 Geehan

I have a similar setup (3G connection on a remote Ubuntu laptop).

While I agree there is no "typical" answer (it depends both on your own usage, as well as sshd/ssh options like "keepalive" frequency, ssh compression & perhaps other ssh options), I've been able to reduce my basic idle ssh bandwidth to 0.2 - 0.3MB / hour (works out to 200MB/month).

I've used tcpdump and then wireshark to visualise and measure my bandwidth usage (in addition to the interface's RX bytes/TX bytes using ifconfig).

0.2 - 0.3MB bandwidth on my rig is with the following options: TCPKeepAlive no (sshd server, sshd_config) and ServerAliveInterval 180, ServerAliveCountMax 40, TCPKeepAlive no (on the client, i.e. ssh_config)

Hope this helps, if not you, then other users with a similar setup.