Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Optimize SSH tunneling latency
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Optimize SSH tunneling latency

I'm using a VPS for SSH tunneling purpose. I play games and forward the port to putty's SSH tunnel. I have tried OpenVPN but the latency/ping is not as good as SSH tunneling (Can you tell me why? I heard people prefer VPN over SSH tunneling but my personal experience shows me that SSH tunnel has lower latency. Maybe the overhead or heavy encryption of VPN? Or maybe I'm just doing something wrong.)

Ok now if SSH tunneling is fastest for latency/ping. How can I make it better?
Currently I'm using arcfour encryption for it and no compression. Is arcfour the fastest encryption? (My priority is not security anyway cause I'm just using it to play games, not transferring sensitive data). And is using no compression is better for latency?

Thank!

Comments

  • said: I heard people prefer VPN over SSH tunneling but my personal experience shows me that SSH tunnel has lower latency

    This is because most VPNs run on UDP protocol (no need for the server / client to send acknowledge packets) and it's stateless compared to (SSH's TCP protocol). If you want to stick with SSH, I think you might want something like http://superuser.com/questions/53103/udp-traffic-through-ssh-tunnel

  • @black said:
    This is because most VPNs run on UDP protocol (no need for the server / client to send acknowledge packets) and it's stateless compared to (SSH's TCP protocol). If you want to stick with SSH, I think you might want something like http://superuser.com/questions/53103/udp-traffic-through-ssh-tunnel

    so you mean VPN (UDP) should has lower latency compared with SSH (TCP)? But I feel the other way around...

  • PcNy said: so you mean VPN (UDP) should has lower latency compared with SSH (TCP)? But I feel the other way around...

    That's correct. If we only consider the 2 protocols, UDP has less overhead compared to TCP. Again, that's because of the session management in TCP, which is not present in UDP.

  • MakenaiMakenai Member
    edited February 2015

    Did you disable compression while using VPN? i.e OpenVPN has normally comp-lzo enabled, which makes online gaming almost impossible.

  • @Makenai said:
    Did you disable compression while using VPN? i.e OpenVPN has normally comp-lzo enabled, which makes online gaming almost impossible.

    I used the default setting comes with OpenVPN Server. I assume this is why I got high latency?

  • @PcNy said:
    I used the default setting comes with OpenVPN Server. I assume this is why I got high latency?

    Well post the config here. I don't really know what is default for OpenVPN.

  • If all you want is to route your traffic through your vps you should not use a VPN but simply (unencrypted) tunneling through your VPS.

  • Ssh with Putty/MyEnTunnel should do in your case...

  • He doesn't need encryption and encryption costs performance and so does SSH.

  • ATHKATHK Member
    edited February 2015

    @bsdguy said:
    He doesn't need encryption and encryption costs performance and so does SSH.

    What's the real benefit to encryption anyway? Is it really just for those who assume everyone is snooping their packets and seeing what websites they visit?

    And how much does this affect performance?

  • @ATHK

    I'm not a gamer but from what little I know about gaming latency (I guess gamers mean sth. like "time from my PC to the game server") seems to be a major factor for them.

    The cost? Well, besides the encryption itself, which is a couple of cycles per Byte (assuming a fast algorithm like AES) it costs the shifting (again) of data tofro the CPU, wasted/dirty cache and pipelines. Plus (not that small) protocol overhead for SSH, OpenVPN or whatever.

  • @bsdguy said:
    ATHK

    I'm not a gamer but from what little I know about gaming latency (I guess gamers mean sth. like "time from my PC to the game server") seems to be a major factor for them.

    The cost? Well, besides the encryption itself, which is a couple of cycles per Byte (assuming a fast algorithm like AES) it costs the shifting (again) of data tofro the CPU, wasted/dirty cache and pipelines. Plus (not that small) protocol overhead for SSH, OpenVPN or whatever.

    So with your experience, gaming or not what would you suggest one to do if packet snooping isn't a concern?

    The obvious sounds like turning encryption off, but it doesn't sound like a real downfall on performance to me.

    The way I'm looking at it is just general home usage, I have OpenVPN on one box which can easily max out my home connection, it's actually faster at loader YouTube videos than it is to go through my ISP which buffers every minute or so....

  • @ATHK

    I already wrote what one could use as a good option ff encryption were not desired.

    Concerning youtube I can't help because I'm not concerned or knowledgable in that area.

    And concerning OpenVPN I agree because I also never had problems. Probably it's to do with good (or lousy) configuration.

    One hint given by someone above, however, is noteworthy. Yes, it is indeed not the smartest idea (speed wise) to transport udp packets through a TCP tunnel.

  • Well is there a way I could tunnel through my VPS with lowest overhead possible (no encryption, etc) and using UDP?

Sign In or Register to comment.