Is on the fly compression supposed to work? I'm having problems getting "comp-lzo" option to work.
My config file:
dev tun
comp-lzo yes
secret my.key
ifconfig 10.12.12.1 10.12.12.2
verb 3
(client side is similar)
I am using the Fedora16 distributed openvpn 2.2.1 and also tried an executable compiled myself from the sources with the lzo library and headers explicitly configured, showing the same behavior.
I'm running a 10 megabit connection between both ends. If I tranfer (sftp) a large highly compressable file (mkfile 10240k FILE) I clearly see that no compression is taking place (speed is 966 KBytes/s) over the vpn connection.
When I transfer the file over the same network (but not using the vpn) using ssh's compression option sftp -O "Compression=yes" I see a 12-fold speedup due to compression taking place, so the file compresses fine.
An sftp -o "Compression=yes" over the vpn connection also compresses fine (10-fold speedup) but I would like openvpn to handle the compression like it seems intended with comp-lzo.
Am I configuring openvpn wrong? Why is it not compressing, how can I debug the problem?
Requesting help to get comp-lzo working
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
Forum rules
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
Please visit (and READ) the OpenVPN HowTo http://openvpn.net/howto prior to asking any questions in here!
-
- OpenVpn Newbie
- Posts: 2
- Joined: Wed Nov 23, 2011 7:00 pm
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Requesting help to get comp-lzo working
LZO compression over a VPN tunnel will not give you the same compression ratios as 'scp -O Compression=yes' ; OpenVPN's LZO compression can only try to compress each 1472 bytes packet that is sent over the wire - that will never be as effective as a full blown file encryption (like scp can do).
To test OpenVPN's encryption speed try to copy over a file containing all zeros and a file containing random stuf (e.g. a .tar.gz or ZIP file). You should clearly see a difference in transfer speeds when lzo is enabled or disabled.
To test OpenVPN's encryption speed try to copy over a file containing all zeros and a file containing random stuf (e.g. a .tar.gz or ZIP file). You should clearly see a difference in transfer speeds when lzo is enabled or disabled.
-
- OpenVpn Newbie
- Posts: 2
- Joined: Wed Nov 23, 2011 7:00 pm
Re: Requesting help to get comp-lzo working
You make a good point, and I understand I have to expect 'less' compression from the VPN compared to scp. The experiment you suggest is exactly what I tested as well on different file types.janjust wrote:To test OpenVPN's encryption speed try to copy over a file containing all zeros and a file containing random stuf (e.g. a .tar.gz or ZIP file). You should clearly see a difference in transfer speeds when lzo is enabled or disabled.
I saw that in both cases (with compression (on both ends) enabled and disabled) that transfer speeds are identical for all files (all 6 tests give the same transfer speed).
This leads me to believe even in the encryption 'enabled' situation no compression is taking place as the non compressable file would probably be transferred slightly slower and the compressable files should be noticably faster, but none of this shows.
I tried with 10 MByte files containing only zeros (best compressability), ascii only (fairly compressable), and /dev/urandom data (not compressable at all).
Any ideas?