johnsiilver / golib Goto Github PK
View Code? Open in Web Editor NEWOpen version of common golang libraries useful to many projects.
License: Other
Open version of common golang libraries useful to many projects.
License: Other
When I run the benchmark test on my MacBook I observe that for 1MB payload GRPC is almost twice as fast as UDS. It was mentioned that "To get better performance in large sizes, I had to add some kernel buffer space over the defaults, which lead to close to double performance". Anyone know how to add "some kernel buffer space over the defaults"?
Results below:
2022/10/04 17:37:17 benchmark.go:119: Running tests for: uds
2022/10/04 17:37:17 benchmark.go:122: Test Params: main.testParms{Concurrency:12, Amount:10000, PacketSize:1024, Alloc:false}
2022/10/04 17:37:18 benchmark.go:122: Test Params: main.testParms{Concurrency:12, Amount:10000, PacketSize:10240, Alloc:false}
2022/10/04 17:37:20 benchmark.go:122: Test Params: main.testParms{Concurrency:12, Amount:10000, PacketSize:102400, Alloc:false}
2022/10/04 17:37:22 benchmark.go:122: Test Params: main.testParms{Concurrency:12, Amount:10000, PacketSize:1024000, Alloc:false}
2022/10/04 17:37:38 benchmark.go:122: Test Params: main.testParms{Concurrency:1, Amount:10000, PacketSize:1024, Alloc:true}
2022/10/04 17:37:42 benchmark.go:122: Test Params: main.testParms{Concurrency:1, Amount:10000, PacketSize:10240, Alloc:true}
2022/10/04 17:37:46 benchmark.go:122: Test Params: main.testParms{Concurrency:1, Amount:10000, PacketSize:102400, Alloc:true}
2022/10/04 17:37:57 benchmark.go:122: Test Params: main.testParms{Concurrency:1, Amount:10000, PacketSize:1024000, Alloc:true}
[Speed]
[12 Users][10000 Requests][1.0 kB Bytes] - min 44.145µs/sec, max 1.626258ms/sec, avg 233.776µs/sec, rps 50624.37
[12 Users][10000 Requests][10 kB Bytes] - min 91.93µs/sec, max 1.305938ms/sec, avg 396.359µs/sec, rps 30119.14
[12 Users][10000 Requests][102 kB Bytes] - min 751.183µs/sec, max 7.131249ms/sec, avg 1.284381ms/sec, rps 9317.00
[12 Users][10000 Requests][1.0 MB Bytes] - min 8.975998ms/sec, max 183.318841ms/sec, avg 17.873009ms/sec, rps 670.42
[Allocs]
[10000 Requests][1.0 kB Bytes] - allocs 290,385
[10000 Requests][10 kB Bytes] - allocs 302,219
[10000 Requests][102 kB Bytes] - allocs 321,047
[10000 Requests][1.0 MB Bytes] - allocs 336,841
2022/10/04 17:38:59 benchmark.go:119: Running tests for: grpc
2022/10/04 17:38:59 benchmark.go:122: Test Params: main.testParms{Concurrency:12, Amount:10000, PacketSize:1024, Alloc:false}
2022/10/04 17:39:01 benchmark.go:122: Test Params: main.testParms{Concurrency:12, Amount:10000, PacketSize:10240, Alloc:false}
2022/10/04 17:39:02 benchmark.go:122: Test Params: main.testParms{Concurrency:12, Amount:10000, PacketSize:102400, Alloc:false}
2022/10/04 17:39:04 benchmark.go:122: Test Params: main.testParms{Concurrency:12, Amount:10000, PacketSize:1024000, Alloc:false}
2022/10/04 17:39:13 benchmark.go:122: Test Params: main.testParms{Concurrency:12, Amount:10000, PacketSize:1024, Alloc:true}
2022/10/04 17:39:17 benchmark.go:122: Test Params: main.testParms{Concurrency:1, Amount:10000, PacketSize:10240, Alloc:true}
2022/10/04 17:39:22 benchmark.go:122: Test Params: main.testParms{Concurrency:1, Amount:10000, PacketSize:102400, Alloc:true}
2022/10/04 17:39:30 benchmark.go:122: Test Params: main.testParms{Concurrency:1, Amount:10000, PacketSize:1024000, Alloc:true}
[Speed]
[12 Users][10000 Requests][1.0 kB Bytes] - min 41.172µs/sec, max 3.198751ms/sec, avg 231.151µs/sec, rps 50555.10
[12 Users][10000 Requests][10 kB Bytes] - min 67.013µs/sec, max 3.159617ms/sec, avg 381.454µs/sec, rps 30822.76
[12 Users][10000 Requests][102 kB Bytes] - min 215.603µs/sec, max 5.728779ms/sec, avg 1.115849ms/sec, rps 10716.17
[12 Users][10000 Requests][1.0 MB Bytes] - min 3.849356ms/sec, max 17.255924ms/sec, avg 9.977688ms/sec, rps 1201.41
[Allocs]
[10000 Requests][1.0 kB Bytes] - allocs 1,518,299
[10000 Requests][10 kB Bytes] - allocs 1,701,021
[10000 Requests][102 kB Bytes] - allocs 1,838,238
[10000 Requests][1.0 MB Bytes] - allocs 2,036,568
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.