Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

Load Tests

Vlad Stan edited this page Dec 3, 2025 · 18 revisions

Load Tests across different LNbits versions

Testing the load on LNbits core. This does not include extension functionality.

Prerequisites

  • increase Rate Limiter in settings to 100000

Test Scenarios

Different test scenarios that cover the usual interaction of the users with the application

Scenario 01 (regular user flow):

This is a regular user that sends and receive a moderate amount of payments (around 20 during the tests). The test starts a number of XXX users in parallel and analyzes how the system behaves (XXX can vary from 10 to 10 000). There is ramp-up period (users login at one second one after another). There also exists a think time (usually 1 sec) between different users actions.

Steps (set-up phase):

  • Register User
  • Get User details (as done from the UI)
  • Logout User
  • Top-up wallet of freshly registered users

Steps (test phase):

  • Login User
  • Get User details
  • Create New Wallet
  • Repeat XXX times:
    • [user] Get Enabled Extensions
    • [user] Get BTC Price
    • [user] Create Invoice
    • [user] Pay Invoice
    • [user] Search Payments (in one wallet)
    • [user] Search Payments (across all wallets - Payments page)
    • [user] Get All Extensions
  • Logout

Scenario 2 (heavy user)

This user has a many wallets and many payments in each wallet. The parallel requests do not simulate real user actions, but are more similar to API calls from different systems.

Steps (set-up phase):

  • the user is already created, it has a large number of wallets and of payments (a loadtest DB is maintained for this)

Steps (test phase):

  • Login User
  • Get User details
  • Create New Wallet

Load Test Runs

Results for different test runs.

Scenario 01

Result LNbits
version
DB Type System Number
of Users
Existing
Users
Count
Existing
Payments
Count
Existing
Wallets
Count
Think
Time
(sec)
0001: all good 1.4.0 SQLite Macbook 10 0 0 0 1
0002: all good 1.4.0 SQLite Macbook 100 0 0 0 1
0003 Pay Invoice is too slow 1.4.0 SQLite Macbook 300 0 0 0 1
0004 1.4.0 SQLite Macbook 100 10.000 50.000 10.000 1
0004 1.4.0 SQLite Macbook 300 0 0 0 1

Results

Test Run 0001

Label # Samples Average Median 90% Line 95% Line 99% Line Min Max Error % Throughput Received KB/sec Sent KB/sec
[user] Login 10 241 238 252 252 256 228 256 0.000% 1.08178 1.10 0.00
[user] Get User Details 10 11 10 16 16 19 7 19 0.000% 1.11037 0.92 0.00
[user] New Wallet 210 82 13 31 36 3033 8 3594 0.000% 1.79779 1.25 0.00
[user] Get Enabled Extensions 200 14 10 24 38 67 5 115 0.000% 1.80727 0.34 1.43
[user] Get BTC Price 200 13 3 4 4 12 2 1525 0.000% 1.80755 0.42 1.43
[user] Create Invoice 200 98 37 73 103 1998 20 4600 0.000% 1.79099 1.60 0.00
[user] Pay Invoice 200 86 54 113 139 200 27 3708 0.000% 1.79090 1.61 0.00
[user] Search Wallet Payments 200 42 16 37 49 148 7 3592 0.000% 1.79149 5.23 1.63
[user] Search All Payments 200 38 16 30 43 247 7 2960 0.000% 1.79150 3.96 1.50
[user] Logout 10 2 3 4 4 4 2 4 0.000% 1.49454 0.87 0.00
TOTAL 1440 54 17 67 103 623 2 4600 0.000% 12.30002 14.00 5.69

Test Run 0002

Setup Response Time User Run Response Time Aggregate Times
image image image
Label # Samples Average Median 90% Line 95% Line 99% Line Min Max Error % Throughput Received KB/sec Sent KB/sec
[user] Login 100 393 328 567 705 1346 222 2014 0.000% 1.00430 1.02 0.00
[user] Get User Details 100 399 232 1082 1227 1375 8 2351 0.000% .99352 0.82 0.00
[user] New Wallet 2100 806 810 1318 1433 3200 8 3298 0.000% 6.38453 4.43 0.00
[user] Get Enabled Extensions 2000 409 394 662 796 1260 6 2637 0.000% 6.20482 1.16 4.92
[user] Get BTC Price 2000 8 3 6 12 16 1 1607 0.000% 6.20494 1.45 4.91
[user] Create Invoice 2000 1518 1653 2210 2356 4265 21 4341 0.000% 6.18253 5.52 0.00
[user] Pay Invoice 2000 2461 2664 3589 4028 5604 31 5705 0.000% 6.17888 5.57 0.00
[user] Search Wallet Payments 2000 901 931 1348 1487 3156 8 3305 0.000% 6.17850 18.26 5.64
[user] Search All Payments 2000 417 385 732 900 1995 7 2722 0.000% 6.17950 13.81 5.19
[user] Logout 100 2 2 4 4 5 2 11 0.000% .71271 0.41 0.00
TOTAL 14400 917 600 2383 2984 3864 1 5705 0.000% 43.74294 50.16 20.28

Test Run 0003

Setup Response Time User Run Response Time Aggregate Times
image image image
Label # Samples Average Median 90% Line 95% Line 99% Line Min Max Error % Throughput Received KB/sec Sent KB/sec
[user] Login 300 1222 1186 2418 2607 3218 224 3938 0.000% .99313 1.02 0.00
[user] Get User Details 300 3083 3134 6751 7104 8271 8 8576 0.000% .97669 0.81 0.00
[user] New Wallet 6300 5237 5512 8436 8827 9228 7 10119 0.000% 4.53714 3.15 0.00
[user] Get Enabled Extensions 6000 3171 3270 4798 5429 7328 5 9740 0.000% 4.35499 0.82 3.46
[user] Get BTC Price 6000 9 3 6 8 24 1 3518 0.000% 4.35501 1.01 3.45
[user] Create Invoice 6000 8528 9606 11934 12255 12871 22 13213 0.000% 4.34382 3.88 0.00
[user] Pay Invoice 6000 18324 20932 24695 25317 26584 29 27008 0.000% 4.33771 3.92 0.00
[user] Search Wallet Payments 6000 5415 5863 8385 8950 10519 4 11181 0.017% 4.33757 13.16 3.97
[user] Search All Payments 6000 3198 3209 4925 5674 8184 8 10586 0.000% 4.33747 9.98 3.65
[user] Logout 300 4 3 5 6 15 2 167 0.000% .28341 0.16 0.00
TOTAL 43200 6161 4071 17125 22811 24888 1 27008 0.002% 31.10624 36.31 14.45

Test Run 0004

Setup Response Time User Run Response Time Aggregate Times
image image image
Label # Samples Average Median 90% Line 95% Line 99% Line Min Max Error % Throughput Received KB/sec Sent KB/sec
[user] Login 100 1513 1618 2654 2848 3065 237 3365 0.000% .98241 1.00 0.00
[user] Get User Details 100 3425 2710 7371 7592 7940 57 8044 0.000% .92471 0.77 0.00
[user] New Wallet 2100 5686 5003 8999 9848 17002 58 17101 0.000% 1.78291 1.24 0.00
[user] Get Enabled Extensions 2000 2927 2965 4887 6038 7335 14 8493 0.000% 1.72832 0.66 1.37
[user] Get BTC Price 2000 49 3 6 11 1776 2 3264 0.000% 1.72833 0.40 1.37
[user] Create Invoice 2000 9453 9552 11926 12903 14091 148 14265 0.000% 1.71850 1.53 0.00
[user] Pay Invoice 2000 16516 17278 20733 21693 22035 256 23440 0.000% 1.71090 1.54 0.00
[user] Search Wallet Payments 2000 6348 6113 9865 10679 11680 223 17138 0.000% 1.70934 5.20 1.56
[user] Search All Payments 2000 3058 3055 5536 6280 9417 45 9976 0.000% 1.70970 3.94 1.44
[user] Logout 100 2 3 3 4 5 2 18 0.000% .31491 0.18 0.00
TOTAL 14400 6190 4704 15442 18332 21010 2 23440 0.000% 12.22250 14.62 5.67

Clone this wiki locally