-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
I'm running #10535 . We are getting decent performance now compared to bbolt (not shown), but KV mode is still slower than native SQL schema mode.
I ran the following test:
Alice (SQLite, native sql) -> Bob (SQLite, native sql)
Charlie (SQLite, KV-mode) -> Dave (SQLite, native sql)
where Alice sends payments to Bob as quick as possible over a direct channel. Similarly, Charlie sends payments to Dave over a direct channel as quick as possible. Bob and Dave don't send any payments, they only receive payments. Alice and Charlie also have 10 parallel workers that request invoices from Bob and Dave and then send payments to them.
You can see that Charlie is performing better than Alice at sending payments over a long period of time, even though Charlie is in KV-mode.
Another thing we might want to pursue: Is the invoices side of things a much greater bottleneck than the payments side? We don't have a clear view right now how much more optimizations we can make on the sending side as we don't know if it is the primary bottleneck in payment throughput. Probably a good way to test this would be for Charlie to have channels with many other nodes and try to make parallel payments to all of those nodes at the same time. Currently Charlie only makes payments to Dave.
I do want to point out that even though the native SQL schema mode is slightly slower here than KV mode, we should be still get some other big gains by switching like improved startup time and listpayments query time with the better architecture (I am still testing these things separately).
I have not re-run this comparison with postgres as the backend, but I think that is another thing that needs to be explored. In the past it seems that postgres performs much worse in KV mode than SQLite, so likely we won't see the same trend there.