Re: [Openvpn-users] Bug in status.c when building with VC

Blaine Fleming <groups@xxxxxxxxxxxxx> said:
> >Can you try making ICL/VC builds which are statically linked with OpenSSL?
> >Right now they appear to have dynamic linkages to a non-MinGW-generated
> >OpenSSL.
>
> I have posted a static version of the VC7 binary but I have yet to get ICL
> to give me a successful static build. I also posted the VC binaries for
> OpenSSL (0.9.7e) that the all dynamic builds were linked against (except
> mingw). Again, they are all available at http://www.digital-z.net/openvpn .
>
> Looking at the VC/ICL build process, I see a few points to take a look
> at. First, the /Gy flag provides a more optimized build under VC/ICL. It
> slows compile time a little, but it is worth the extra time. Second, I
> forgot to mention earlier that in proxy.c (beta20) line 395 snprintf is
> being called instead of openvpn_snprintf. This breaks the builds on
> VC/ICL. Is there a reason for this?
I tried the ICL non-static build. It's nearly an order of magnitude slower
than my MinGW build (which is rc1 + a few inconsequential patches). I'm not
totally clear what's going on, but one guess might be that in your ICL build,
the msg() and dmsg() functions in error.h are getting defined as functions,
not macros. If this happens you will see a huge performance penalty -- on par
with what we are seeing here. And because VC apparently doesn't support
#warning, you won't even be warned about it at compile time. (Doesn't VC have
it's own version of #warning, like maybe #warn? -- if so I'd like to fix that
place in error.h where the warning is ifdefed out for VC.)
What I'm seeing in the MinGW benchmarks is that OpenVPN is more I/O than CPU
bound, even with crypto enabled. Note that there's not a big difference in
performance with or without the VPN. This tells me that the bottleneck is in
the network stack and physical I/O layer, which would suggest that incremental
improvements in compiler optimization shouldn't produce a large impact.
With the ICL build, the XP box is hitting 99% CPU usage in the openvpn process
while the linux server end of the connection is only seeing the openvpn daemon
hit 2 or 3% of CPU utilization.
Here are the stats:
Server: SuSE 9.1 Linux 2.6 (~2GHz)
Client: XP SP2 Laptop (~2GHz)
Network: 100 Mbps Ethernet through hub
ICL Blowfish + HMAC-SHA1
Linux 2.6 (~2GHz) -> XP SP2 (~2GHz)
ftp: 51510578 bytes received in 86.03Seconds 598.72Kbytes/sec.
XP SP2 (~2GHz) -> Linux 2.6 (~2GHz)
ftp: 51510578 bytes sent in 112.48Seconds 457.95Kbytes/sec.
MinGW No Crypto
Linux 2.6 (~2GHz) -> XP SP2 (~2GHz)
ftp: 51510578 bytes received in 14.35Seconds 3589.34Kbytes/sec.
ftp: 51510578 bytes received in 13.66Seconds 3770.91Kbytes/sec.
XP SP2 (~2GHz) -> Linux 2.6 (~2GHz)
ftp: 51510578 bytes sent in 7.89Seconds 6527.76Kbytes/sec.
ftp: 51510578 bytes sent in 8.05Seconds 6397.24Kbytes/sec.
MinGW Blowfish + HMAC-SHA1
Linux 2.6 (~2GHz) -> XP SP2 (~2GHz)
ftp: 51510578 bytes received in 15.68Seconds 3284.69Kbytes/sec.
ftp: 51510578 bytes received in 13.48Seconds 3821.54Kbytes/sec.
XP SP2 (~2GHz) -> Linux 2.6 (~2GHz)
ftp: 51510578 bytes sent in 9.83Seconds 5238.01Kbytes/sec.
ftp: 51510578 bytes sent in 10.02Seconds 5138.72Kbytes/sec.
No VPN
Linux 2.6 (~2GHz) -> XP SP2 (~2GHz)
ftp: 33129027 bytes received in 10.12Seconds 3272.33Kbytes/sec.
ftp: 33129027 bytes received in 5.39Seconds 6148.67Kbytes/sec.
XP SP2 (~2GHz) -> Linux 2.6 (~2GHz)
ftp: 51510578 bytes sent in 6.69Seconds 7700.79Kbytes/sec.
ftp: 51510578 bytes sent in 13.14Seconds 3920.43Kbytes/sec.
(I think the big variations in the No-VPN test are because of the slowness of
the XP Laptop's hard drive, making transfers from cache much faster than
transfers from disk.)
James
____________________________________________
Openvpn-users mailing list
Openvpn-users@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/openvpn-users