@@ -69,26 +69,31 @@ We use Google Chrome version 130.0.6723.58.
69
69
70
70
``` console
71
71
$ google-chrome --version
72
- Google Chrome 130 .0.6723.58
72
+ Google Chrome 136 .0.7103.113
73
73
```
74
74
75
- And Lightpanda commit [ b846541ff69082f4d283155f0b3651ae0394a240] ( https://github.com/lightpanda-io/browser/commit/b846541ff69082f4d283155f0b3651ae0394a240 ) .
75
+ And Lightpanda commit [ eed3d27] ( https://github.com/lightpanda-io/browser/commit/eed3d27 ) .
76
+
77
+ ``` console
78
+ $ ./lightpanda version
79
+ eed3d27
80
+ ```
76
81
77
82
### Execution time
78
83
79
84
``` console
80
85
$ hyperfine --warmup 3 --runs 20 --shell=none " google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:124/campfire-commerce/" " ./lightpanda --dump http://127.0.0.1:1234/campfire-commerce/"
81
86
Benchmark 1: google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:124/campfire-commerce/
82
- Time (mean ± σ): 598.7 ms ± 8.6 ms [User: 348 .0 ms, System: 165.1 ms]
83
- Range (min … max): 586.3 ms … 611.9 ms 20 runs
87
+ Time (mean ± σ): 589.8 ms ± 7.5 ms [User: 353 .0 ms, System: 161.5 ms]
88
+ Range (min … max): 575.4 ms … 604.8 ms 20 runs
84
89
85
90
Benchmark 2: ./lightpanda --dump http://127.0.0.1:1234/campfire-commerce/
86
- Time (mean ± σ): 19.6 ms ± 0.1 ms [User: 6 .7 ms, System: 4.1 ms]
87
- Range (min … max): 19.4 ms … 19 .9 ms 20 runs
91
+ Time (mean ± σ): 37.1 ms ± 1.2 ms [User: 31 .7 ms, System: 6.8 ms]
92
+ Range (min … max): 34.9 ms … 40 .9 ms 20 runs
88
93
89
94
Summary
90
95
'./lightpanda --dump http://127.0.0.1:1234/campfire-commerce/' ran
91
- 30.50 ± 0.49 times faster than 'google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:124/campfire-commerce/'
96
+ 15.91 ± 0.57 times faster than 'google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:124/campfire-commerce/'
92
97
```
93
98
94
99
![ aws.m5 hyperfine] ( ./img/aws_m5_hyperfine.png )
@@ -98,48 +103,47 @@ Summary
98
103
``` console
99
104
$ /usr/bin/time -v google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:1234/campfire-commerce/
100
105
Command being timed: "google-chrome --user-data-dir=/tmp/bench_chrome --headless=new --dump-dom http://127.0.0.1:1234/campfire-commerce/"
101
- User time (seconds): 0.34
102
- System time (seconds): 0.19
103
- Percent of CPU this job got: 94 %
104
- Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.57
106
+ User time (seconds): 0.36
107
+ System time (seconds): 0.18
108
+ Percent of CPU this job got: 91 %
109
+ Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.60
105
110
Average shared text size (kbytes): 0
106
111
Average unshared data size (kbytes): 0
107
112
Average stack size (kbytes): 0
108
113
Average total size (kbytes): 0
109
- Maximum resident set size (kbytes): 174096
114
+ Maximum resident set size (kbytes): 183212
110
115
Average resident set size (kbytes): 0
111
- Major (requiring I/O) page faults: 17
112
- Minor (reclaiming a frame) page faults: 20609
113
- Voluntary context switches: 2563
114
- Involuntary context switches: 1618
116
+ Major (requiring I/O) page faults: 0
117
+ Minor (reclaiming a frame) page faults: 21131
118
+ Voluntary context switches: 3066
119
+ Involuntary context switches: 1548
115
120
Swaps: 0
116
- File system inputs: 1048
117
- File system outputs: 4576
121
+ File system inputs: 0
122
+ File system outputs: 3488
118
123
Socket messages sent: 0
119
124
Socket messages received: 0
120
125
Signals delivered: 0
121
126
Page size (bytes): 4096
122
127
Exit status: 0
123
-
124
128
```
125
129
126
130
``` console
127
- $ /usr/bin/time -v ./lightpanda --dump http://127.0.0.1:1234/campfire-commerce/
128
- Command being timed: "./lightpanda --dump http://127.0.0.1:1234/campfire-commerce/"
129
- User time (seconds): 0.00
130
- System time (seconds): 0.00
131
- Percent of CPU this job got: 92 %
132
- Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.01
131
+ $ /usr/bin/time -v ./lightpanda fetch --dump http://127.0.0.1:1234/campfire-commerce/
132
+ Command being timed: "./lightpanda fetch --dump http://127.0.0.1:1234/campfire-commerce/"
133
+ User time (seconds): 0.03
134
+ System time (seconds): 0.01
135
+ Percent of CPU this job got: 100 %
136
+ Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.04
133
137
Average shared text size (kbytes): 0
134
138
Average unshared data size (kbytes): 0
135
139
Average stack size (kbytes): 0
136
140
Average total size (kbytes): 0
137
- Maximum resident set size (kbytes): 21276
141
+ Maximum resident set size (kbytes): 26540
138
142
Average resident set size (kbytes): 0
139
143
Major (requiring I/O) page faults: 0
140
- Minor (reclaiming a frame) page faults: 925
141
- Voluntary context switches: 6
142
- Involuntary context switches: 11
144
+ Minor (reclaiming a frame) page faults: 1229
145
+ Voluntary context switches: 32
146
+ Involuntary context switches: 827
143
147
Swaps: 0
144
148
File system inputs: 0
145
149
File system outputs: 0
@@ -201,33 +205,33 @@ $ BROWSER_ADDRESS=http://127.0.0.1:9222 npm run bench-puppeteer-cdp
201
205
................................................................................
202
206
....................
203
207
total runs 100
204
- total duration (ms) 25218
205
- avg run duration (ms) 248
206
- min run duration (ms) 216
207
- max run duration (ms) 451
208
+ total duration (ms) 25275
209
+ avg run duration (ms) 251
210
+ min run duration (ms) 218
211
+ max run duration (ms) 448
208
212
```
209
213
210
214
![ aws.m5 Puppeteer with Google Chrome] ( ./img/aws_m5_puppeteer_chrome.png )
211
215
212
216
``` console
213
217
Command being timed: "google-chrome --headless=new --remote-debugging-port=9222"
214
- User time (seconds): 16.19
215
- System time (seconds): 6.59
216
- Percent of CPU this job got: 41 %
217
- Elapsed (wall clock) time (h:mm:ss or m:ss): 0:54.51
218
+ User time (seconds): 16.38
219
+ System time (seconds): 6.13
220
+ Percent of CPU this job got: 68 %
221
+ Elapsed (wall clock) time (h:mm:ss or m:ss): 0:32.78
218
222
Average shared text size (kbytes): 0
219
223
Average unshared data size (kbytes): 0
220
224
Average stack size (kbytes): 0
221
225
Average total size (kbytes): 0
222
- Maximum resident set size (kbytes): 207828
226
+ Maximum resident set size (kbytes): 217020
223
227
Average resident set size (kbytes): 0
224
- Major (requiring I/O) page faults: 138
225
- Minor (reclaiming a frame) page faults: 265165
226
- Voluntary context switches: 143625
227
- Involuntary context switches: 82912
228
+ Major (requiring I/O) page faults: 0
229
+ Minor (reclaiming a frame) page faults: 298036
230
+ Voluntary context switches: 171980
231
+ Involuntary context switches: 87943
228
232
Swaps: 0
229
- File system inputs: 35680
230
- File system outputs: 169688
233
+ File system inputs: 0
234
+ File system outputs: 34680
231
235
Socket messages sent: 0
232
236
Socket messages received: 0
233
237
Signals delivered: 0
@@ -241,7 +245,7 @@ We use Lightpanda commit [b846541ff69082f4d283155f0b3651ae0394a240](https://gith
241
245
242
246
You have to start Lightpanda browser.
243
247
``` console
244
- /usr/bin/time -v ./lightpanda
248
+ /usr/bin/time -v ./lightpanda serve --gc_hints
245
249
```
246
250
247
251
Then you can run the benchmark.
@@ -255,30 +259,30 @@ $ npm run bench-puppeteer-cdp
255
259
................................................................................
256
260
...................
257
261
total runs 100
258
- total duration (ms) 2277
259
- avg run duration (ms) 22
260
- min run duration (ms) 18
261
- max run duration (ms) 40
262
+ total duration (ms) 2861
263
+ avg run duration (ms) 28
264
+ min run duration (ms) 24
265
+ max run duration (ms) 56
262
266
```
263
267
264
268
![ aws.m5 Puppeteer with Lightpanda browser] ( ./img/aws_m5_puppeteer_lightpanda.png )
265
269
266
270
``` console
267
- Command being timed: "./lightpanda"
268
- User time (seconds): 1.05
269
- System time (seconds): 0.55
270
- Percent of CPU this job got: 17 %
271
- Elapsed (wall clock) time (h:mm:ss or m:ss): 0:09.25
271
+ Command being timed: "./lightpanda serve --gc_hints "
272
+ User time (seconds): 2.80
273
+ System time (seconds): 0.29
274
+ Percent of CPU this job got: 50 %
275
+ Elapsed (wall clock) time (h:mm:ss or m:ss): 0:06.15
272
276
Average shared text size (kbytes): 0
273
277
Average unshared data size (kbytes): 0
274
278
Average stack size (kbytes): 0
275
279
Average total size (kbytes): 0
276
- Maximum resident set size (kbytes): 23456
280
+ Maximum resident set size (kbytes): 31544
277
281
Average resident set size (kbytes): 0
278
282
Major (requiring I/O) page faults: 0
279
- Minor (reclaiming a frame) page faults: 62976
280
- Voluntary context switches: 8189
281
- Involuntary context switches: 2804
283
+ Minor (reclaiming a frame) page faults: 42935
284
+ Voluntary context switches: 4588
285
+ Involuntary context switches: 4494
282
286
Swaps: 0
283
287
File system inputs: 0
284
288
File system outputs: 0
0 commit comments