One using Yesod + jaspers Websockets lib, the other with Yesod + Mishael Snoyman's native websocket lib. I was curious what options I might be missing that would ensure a more efficient use of memory, at the moment the non-SSL seems to use about 48kb per connection, while using Haskell's TLS via warp-tls introduces a huge amount of overhead (along with odd handshake issues).
Here's what my results look like:
No SSL
Program started.
Tester started.
Tester finished connecting.
Waiting: 360 Last Memory Increase: 2
WARNING: Program hasn't stopped increasing.
Started with: 2633728
Ended with: 50896896
kB per connection: 47.13
SSL
Program started.
Tester started.
yesod-customws-tls: HandshakeFailed (Error_Protocol ("bad record mac",True,BadRecordMac))
yesod-customws-tls: HandshakeFailed (Error_Protocol ("bad record mac",True,BadRecordMac))
yesod-customws-tls: HandshakeFailed (Error_Protocol ("bad record mac",True,BadRecordMac))
yesod-customws-tls: HandshakeFailed (Error_Protocol ("bad record mac",True,BadRecordMac))
yesod-customws-tls: HandshakeFailed (Error_Protocol ("bad record mac",True,BadRecordMac))
yesod-customws-tls: HandshakeFailed (Error_Protocol ("bad record mac",True,BadRecordMac))
yesod-customws-tls: HandshakeFailed (Error_Protocol ("bad record mac",True,BadRecordMac))
yesod-customws-tls: HandshakeFailed (Error_Protocol ("bad record mac",True,BadRecordMac))
WARNING: Failed to connect all clients
Tester finished connecting.
Waiting: 360 Last Memory Increase: 4
WARNING: Program hasn't stopped increasing.
Started with: 3170304
Ended with: 454221824
kB per connection: 444.03
SSL Overhead per Conn: 396.90
I wait up to 6 minutes for memory to level out, it never does with or without SSL. Is this expected behavior? If not, what options am I missing?