peer-base / peer-pad

📝 Online editor providing collaborative editing in really real-time using CRDTs and IPFS.
https://peerpad.net
MIT License
678 stars 56 forks source link

Manual load test report #275

Open jimpick opened 5 years ago

jimpick commented 5 years ago

I did a manual load test using https://peer-pad-staging.jimpick.com/ ... which should match what is on master right now, I launched the same PeerPad doc in four browsers on my iMac (Chrome, Canary, Firefox Nightly, Safari) and the same four browsers on my MacBook Pro + my iPhone and an Android phone -- 10 peers total.

All browsers were able to connect and share/edit the document. Things got very slow though ... it appears there was a lot of messaging traffic. The Android phone would only sync one character every few seconds. Chrome on my iMac was idling with about 30% CPU usage ... using the profiling tools in Chrome devtools showed that it was processing a huge number of network messages, even though the collaboration was idle. The fans on my iMac spun up, which is rare.

Also, my home wifi router (a fairly old Apple Airport Express) stopped responding during the test. That might be due to the large number of connections or perhaps the high volume of messages.

I'll do some more investigation ... I think I'll try measuring the number of gossip messages being received.

jimpick commented 5 years ago

I made a little 'inbound message speedometer' so I could easily see how many messages are inbound:

https://usercontent.irccloud-cdn.com/file/dxCndqeZ/message-speedometer.mp4

Code: https://github.com/jimpick/peer-pad/commit/a14e4fec581e3739b4ffacc96db451cd531f2f79

It is deployed live on https://peer-pad-staging.jimpick.com/ ... if I open multiple browsers and start typing, there does appear to be an awful lot of incoming messages. It does settle down after a while.

pgte commented 5 years ago

@jimpick 2 suggestions:

  1. Try peer-base master, as it has some improvements on connection management.

  2. Try printing the deltas (as seen in src/collaboration/shared.js) to see if they contain the entire state or only mostly deltas.