Discussion:
[Fab-user] SSH compression?
Jon Dufresne
2013-10-10 17:43:57 UTC
Permalink
Does Fabric support SSH compression? Is this something that I need to
configure at the SSH level or the Fabric level?

For transmitting large amounts of text. SSH compression would greatly
improve performance.

I'm doing something like the following:

run('mysqldump bigdatabase', stdout=open('local.sql'))

Thanks,
Jon
Brandon Whaley
2013-10-10 17:59:14 UTC
Permalink
Hey Jon,

I'm not sure whether it uses compression natively, but you could always
pipe your dump into gzip on the remote end and ungzip the resulting string
when it gets to you. I've never tried this before, so there might be some
kind of encoding problems that give you issues. In that case (and if the
data was particularly compressible) you might want to try piping the
gzipped stream into base64 for the transit, though that would take more
space than ideal (you might still get some bandwidth savings depending on
your data).
Post by Jon Dufresne
Does Fabric support SSH compression? Is this something that I need to
configure at the SSH level or the Fabric level?
For transmitting large amounts of text. SSH compression would greatly
improve performance.
run('mysqldump bigdatabase', stdout=open('local.sql'))
Thanks,
Jon
_______________________________________________
Fab-user mailing list
https://lists.nongnu.org/mailman/listinfo/fab-user
Jon Dufresne
2013-10-10 18:11:50 UTC
Permalink
It looks like Parmiko can enable compression
<http://www.lag.net/paramiko/docs/paramiko.SSHClient-class.html>. Is
there some way to pass this through Fabric into the connect function?
Post by Brandon Whaley
Hey Jon,
I'm not sure whether it uses compression natively, but you could always pipe
your dump into gzip on the remote end and ungzip the resulting string when
it gets to you. I've never tried this before, so there might be some kind
of encoding problems that give you issues. In that case (and if the data
was particularly compressible) you might want to try piping the gzipped
stream into base64 for the transit, though that would take more space than
ideal (you might still get some bandwidth savings depending on your data).
Post by Jon Dufresne
Does Fabric support SSH compression? Is this something that I need to
configure at the SSH level or the Fabric level?
For transmitting large amounts of text. SSH compression would greatly
improve performance.
run('mysqldump bigdatabase', stdout=open('local.sql'))
Thanks,
Jon
_______________________________________________
Fab-user mailing list
https://lists.nongnu.org/mailman/listinfo/fab-user
Loading...