-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 09.01.2014 17:38, Lenz Weber wrote: > It took some testing and just in case someone else needs something > like this, I describe it in detail here: > > Used tools: stunnel, expect, netcat, time > > Scenario: start expect-script logging into imap and downloading a > message against a port opened by stunnel, which does the ecryption > stuff to the endpoint. I did all localhost so I would have no > bandwidth limitations. > > -- stunnel.conf -- [imaps] accept = 10443 connect = localhost:993 > client = yes > > --test.sh-- #!/usr/bin/expect set timeout 30 proc abort {} { exit 2 > } set ip [lindex $argv 0] set port [lindex $argv 1] set cmd [lindex > $argv 2] spawn nc -C $ip $port expect "OK" send "A login > <USERNAME> <PASSWORD>\r\n" expect "A OK" send "A select INBOX\r\n" > expect "A OK" send "$cmd\r\n" expect "A OK" send "A logout\r\n" > expect "A OK" > > > --putting it together- > > Using dd, i created two test files: one 1MB file and one 10MB file > Then I created a new user account and sent him the two > attachments. Mail ID #1 is 1MB in size, Mail ID #2 is 10MB in > size. > > Open stunnel from (unencrypted) port 10443 -> (encrypted) 993 > > $ stunnel4 stunnel.conf > > Receive & time the 1MB file and pipe the output so time won't go up > by a blocking console: > > $ time ./test.sh localhost 10443 "A fetch 1 rfc822.text" > \ > /tmp/lastnctest > > Receive & time the 10MB file and pipe the output so time won't go > up by a blocking console: > > $ time ./test.sh localhost 10443 "A fetch 2 rfc822.text" > \ > /tmp/lastnctest > > > Rinse and repeat. > > --results-- > > This is, at least, unexpected. > > For the 1-MB-File, OpenSSL takes 0.355s and GnuTLS takes 0.316s > For the 10-MB-File, OpenSSL takes 1.636s and GnuTLS takes 60.96 > sec > > Next thing I will do: look at stack traces with GnuTLS and the > 10-MB-File. > > I will report. Okay, this is beyond ridiculous. As soon as I attach strace to the courier main-process, all spawned children are fast. Like Almost-OpenSSL-Fast. See this output: http://pastebin.com/wzUjAdai I start this wihout strace running. Usual test takes about 60 seconds. Then, on a second console, I attach strace. As long as strace is running, the 60 sec go down to 3-4 sec. When I cancel the running strace, the process that was currently running slows down again. I have no idea what causes this. Nice value of those processes does not change, only difference is the attached strace. Of course, for debugging purposes, strace is useless now. Any ideas? -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQIcBAEBAgAGBQJSztgSAAoJEPlcH1TTUTHLL3IP/Ame6VLcTU9BrGGrsdHqmpp3 iJzgeEWfgwlOw5t9HdGQOwvIPZAZpdvW3xzi07ytk1XDaqnPOqYPzPjiIjs7D+J3 Kch6vN8KooeDnW4lxcK11FkyOVpsv+lPBPShDMINGOZJEKIJdX/tGlJx7IFKCn4j M1GAMSR2YHDXYwP7Eq46Rdut99EIIwyEfnjPiteswwYZK+LPKgNvxd9xDscywlQk Wy/1UIV7j5BGdff4Ug/6E1gu/M3SsqP2TqEcrv8kciQlxGBSHQSwZSBLz24nR/Hu TdwxTw1RH3NJFUMLceQNHu6TQwnNZbdo5RSNP/fON4carVbIqmHDlEqkJ873Nr7z MGLh90pfwlC3f9i5Xm0DhVD4srEp/WTassZHWm12rNRqdliSYZ1VjaMZqPpv6hky LdO3i7Ch++ik7KsJyDZ9ArFD/WF8fF4KdTRS4hVlMb34oBBuFVZCdl6CoE+q57FK bHYBOLaUKUM9qrSfhYforImRMGmHS/CgJ5seyH8Kt6pa3RlmNWJ3OjUlr6myTXNF nQHlHaY0PxrcQYxdMvIz+uZTceAP3vRTYw03G+6FcTO7S3lu96IFm8xXUUGkaRca NVcrbA6XA74kvqpPtTvsC/XgPBdFNiTf4boDq1KFxvwn4HAeNNhtLFWqYOxXCM1o pBHaERRuu7RRuFxTKmk1 =hzJG -----END PGP SIGNATURE-----
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________ Courier-imap mailing list Courier-imap@lists.sourceforge.net Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap