Welcome, Guest. Please login or register.
Did you miss your activation email?
+  pfSense Forum
|-+  pfSense English Support» IPsec» IPSec Performance
Username:
Password:
 
 

Pages: [1] 2  All   Go Down
  Print  
Author Topic: IPSec Performance  (Read 2713 times)
0 Members and 1 Guest are viewing this topic.
SectorNine50
Jr. Member
**
Offline Offline

Posts: 32


View Profile
« on: July 09, 2012, 03:57:39 pm »

Hi guys,
I have two pfSense box's with Intel Atom D525 CPU's @ 1.8Ghz.  I currently have an IPSec tunnel running between them with Blowfish 128-bit encryption on both Phase 1 and Phase 2.  I had read that Blowfish encryption would be the best in this situation since there is no hardware acceleration (that I know of) available with this setup.

My question is, how do I increase the throughput on the tunnel, or is it even possible?

Any information is helpful, thanks! Smiley
Logged
cmb
Administrator
Hero Member
*****
Offline Offline

Posts: 6032


View Profile WWW
« Reply #1 on: July 09, 2012, 07:41:57 pm »

Increase throughput beyond what? In general, you should only be limited by the connection speeds at the sites. In some rare cases that may be difficult to achieve because the paths between the two locations aren't great. If they're physically far apart (1000+ miles), the latency can make it difficult to impossible to achieve line rate.
Logged

pfSense Commercial Support

Paying customers receive support priority and as in depth of assistance as desired through the official commercial support channels at portal.pfsense.org. Forum users receive as much help as time permits.
SectorNine50
Jr. Member
**
Offline Offline

Posts: 32


View Profile
« Reply #2 on: July 10, 2012, 12:47:53 am »

Increase throughput beyond what? In general, you should only be limited by the connection speeds at the sites. In some rare cases that may be difficult to achieve because the paths between the two locations aren't great. If they're physically far apart (1000+ miles), the latency can make it difficult to impossible to achieve line rate.

Oh sorry, I guess I forgot that bit.

Right now I am having issues getting decent performance from an RDP connection.  I got a lot of slow-loading images, particularly when a lot changed on the screen.  However, when using the connection direct to the server from outside the IPSec tunnel, it works fine.  When I ping the host on the other side, I usually see pings of around 17ms or so.

I'm not sure exactly what my throughput is at the moment in terms of concrete numbers.  Is there a way I can test that fairly easily?
Logged
jimp
Administrator
Hero Member
*****
Offline Offline

Posts: 12808



View Profile
« Reply #3 on: July 10, 2012, 07:34:44 am »

You might try enabling MSS clamping, System > Advanced, on the Misc tab. Could be an MTU issue holding you back.
Logged

Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Donate to the project | My Wish List
cmb
Administrator
Hero Member
*****
Offline Offline

Posts: 6032


View Profile WWW
« Reply #4 on: July 10, 2012, 09:54:04 pm »

You might try enabling MSS clamping, System > Advanced, on the Misc tab. Could be an MTU issue holding you back.

my guess as well, that can cause RDP stalls in scenarios like those described.
Logged

pfSense Commercial Support

Paying customers receive support priority and as in depth of assistance as desired through the official commercial support channels at portal.pfsense.org. Forum users receive as much help as time permits.
SectorNine50
Jr. Member
**
Offline Offline

Posts: 32


View Profile
« Reply #5 on: July 11, 2012, 06:30:48 pm »

Okay thanks guys, I'll give that a shot.

Will the default MSS setting be fine (can I leave the field blank)?

EDIT:
I changed the MSS setting, and did a little "benchmark."

I moved a file from a computer on the far end to this end and timed it (since Server 2003 doesn't show transfer rate), and found that it transferred at just over 24KB/s.  Does that seem about par for the course?  I think the upload speed at the remote site ~2Mbps, so that strikes me as pretty slow, but I don't have a lot of experience with IPSec (yet!).

I have yet to try another RDP session; when I get the opportunity, I'll let you guys know the results!

Thanks again!
« Last Edit: July 11, 2012, 06:45:15 pm by SectorNine50 » Logged
SectorNine50
Jr. Member
**
Offline Offline

Posts: 32


View Profile
« Reply #6 on: July 12, 2012, 06:14:58 pm »

Last question: So are these boxes powerful enough to get line rate on an encrypted IPSec tunnel, as described above?

I'm starting to wonder if there might be a hardware issue somewhere if they are.
« Last Edit: July 12, 2012, 06:16:37 pm by SectorNine50 » Logged
cmb
Administrator
Hero Member
*****
Offline Offline

Posts: 6032


View Profile WWW
« Reply #7 on: July 14, 2012, 02:59:41 pm »

They're way more than fast enough to saturate 2 Mb.

Everything with SMBv1 (pre-Vista/2008) performs poorly over anything with higher than LAN latency so that's not a good test. Use HTTP or FTP or basically anything other than SMB to test any VPN throughput.
Logged

pfSense Commercial Support

Paying customers receive support priority and as in depth of assistance as desired through the official commercial support channels at portal.pfsense.org. Forum users receive as much help as time permits.
SectorNine50
Jr. Member
**
Offline Offline

Posts: 32


View Profile
« Reply #8 on: July 23, 2012, 03:40:34 am »

So I ran a little test using FTP through the tunnel.

I found that Mozilla reported the speed anywhere between 14KB/s to 40KB/s, and that in the FileZilla server console, the speed seemed to be bursting.  It would sit at 0KB/s, then shoot up for a moment to something like 30KB/s for a bit, then back down to 0KB/s.

I'm not really sure what the deal is here, I can't think of what would be limiting the tunnel.  Any ideas, by chance?
Logged
SectorNine50
Jr. Member
**
Offline Offline

Posts: 32


View Profile
« Reply #9 on: July 26, 2012, 02:09:05 pm »

I hate to bump this, but I'm really hoping that there is a solution, and that I'm not just SOL.

Could it have anything to do with the Comcast "Business Class" cable modems?  I wasn't able to shut off the NAT on it, which is very annoying (if you know how, please let me know), but I wouldn't think that would slow things down.

It's strange to me that all traffic outside of the tunnel is line speed no problem, but inside the tunnel isn't even close.
Logged
SectorNine50
Jr. Member
**
Offline Offline

Posts: 32


View Profile
« Reply #10 on: August 22, 2012, 07:20:14 am »

Alright!  I've successfully fixed my problem! Grin

For anyone that may have problems like this, I fixed my issue by disabling "Prefer older IPSec SAs" in the System -> Advanced -> Miscellaneous section.  On my two systems, it seems that box was checked by default.
Logged
dhatz
Hero Member
*****
Offline Offline

Posts: 922


View Profile
« Reply #11 on: August 22, 2012, 07:37:31 am »

That's very strange, because "Prefer older IPSec SAs" has no connection with IPsec throughput ...

I'd start by investigating the MTU issue, as suggested by previous posters. Also, are you filtering traffic inside the IPsec tunnel (icmp traffic in particular) ?
Logged
SectorNine50
Jr. Member
**
Offline Offline

Posts: 32


View Profile
« Reply #12 on: August 22, 2012, 07:51:30 am »

That's very strange, because "Prefer older IPSec SAs" has no connection with IPsec throughput ...

I'd start by investigating the MTU issue, as suggested by previous posters. Also, are you filtering traffic inside the IPsec tunnel (icmp traffic in particular) ?

I had already turned MTU clamping on, and that didn't seem to make a difference.  No traffic is being filtered on the tunnel, it's a straight-shot both directions.

The interesting thing was about this "throughput" issue, wasn't so much that the system didn't seem able to go over a certain speed, but instead, it was "bursting."  In other words, it would shoot up to 66kb/s then back down to 0kb/s over and over, almost like it gained and lost connection repeatedly, or like the tunnel was going up and down rapidly.

My thought was that perhaps the firewalls were fighting between older and newer SAs constantly, but like I said earlier, I'm not all that well versed in terms of IPSec.

Is it possible that my MTU setting didn't take until I modified and saved another setting on the page?
« Last Edit: August 22, 2012, 07:58:02 am by SectorNine50 » Logged
SectorNine50
Jr. Member
**
Offline Offline

Posts: 32


View Profile
« Reply #13 on: August 23, 2012, 10:47:30 am »

The problem has returned...

Man this is frustrating.
Logged
SectorNine50
Jr. Member
**
Offline Offline

Posts: 32


View Profile
« Reply #14 on: August 30, 2012, 11:42:38 pm »

It appears you fellas were correct about the whole MTU thing!

I had initially left the MSS clamping text box blank, assuming that the default 1400 would do the trick.  However, after some fooling around, I changed the MSS clamping setting to 1300, and the speed shot up!  I then changed it to 1400, and the speeds once again slowed way down.  Once again, I set them to 1300, and the speeds shot up again, so I think it's safe to assume that was the issue.

Now I'm curious as to why this was the case between these two boxes.  Can anyone give me a high-level explanation, or perhaps knows of some documentation that would explain this issue?

Thanks!
Logged
Pages: [1] 2  All   Go Up
  Print  
 
Jump to:  

 

Page created in 0.03 seconds with 19 queries.