Arjun Roy
b1d73a01f1
Removed duplicate static table from hpack table. Removed an or instruction for
...
every usage of static grpc metadata. Inlined hpack table lookups for static
metadata.
This leads to faster hpack parser creation:
BM_HpackParserInitDestroy 5.32µs ± 1% 0.06µs ± 1% -98.91% (p=0.000 n=18+19)
And slightly faster parsing:
BM_HpackParserParseHeader<RepresentativeClientInitialMetadata, OnInitialHeader>
456ns ± 1% 435ns ± 1% -4.74% (p=0.000 n=18+19)
BM_HpackParserParseHeader<MoreRepresentativeClientInitialMetadata,
OnInitialHeader>
1.06µs ± 2% 1.04µs ± 2% -1.82% (p=0.000 n=19+20)
It also yields a slight (0.5 - 1.0 microsecond) reduction in CPU time for
fullstack unary pingpong:
BM_UnaryPingPong<TCP, NoOpMutator, NoOpMutator>/0/512
[polls/iter:3.0001 ] 23.9µs ± 2%
23.0µs ± 1% -3.63% (p=0.002 n=6+6)
BM_UnaryPingPong<TCP, NoOpMutator, NoOpMutator>/0/32768
[polls/iter:3.00015 ] 35.1µs ± 1%
34.2µs ± 1% -2.57% (p=0.036 n=5+3)
BM_UnaryPingPong<MinTCP, NoOpMutator, NoOpMutator>/8/0
[polls/iter:3.00011 ] 21.7µs ± 3%
21.2µs ± 2% -2.44% (p=0.017 n=6+5)
2019-07-15 15:39:31 -07:00
Esun Kim
e18ed03c04
Made gRPC inialized after entering main function in microbenchmarks.
2019-05-02 16:58:37 -07:00
Arjun Roy
8ce42f67b2
Shrink arena size by 40 bytes and add additional
...
alignment options (for cache-alignment).
We shrink by:
1) Removing an unnecessary zone pointer.
2) Replacing gpr_mu (40 bytes when using pthread_mutex_t) with
std::atomic_flag.
We also header-inline the fastpath alloc (ie. when not doing a zone
alloc) and move the malloc() for a zone alloc outside of the mutex
critical zone, which allows us to replace the mutex with a spinlock.
We also cache-align created arenas.
2019-04-24 16:39:03 -07:00
Soheil Hassas Yeganeh
48e4a81b05
Remeve memset(0) from arena allocated memory.
...
Callers are updated to properly initialize the memory.
This behavior can be overridden using GRPC_ARENA_INIT_STRATEGY
environment variable.
2018-11-05 10:12:39 -05:00
Hope Casey-Allen
4c6e7ce15d
Destroy metadata buffer at end of benchmark loop
2018-09-20 12:56:56 -07:00
Hope Casey-Allen
d44feec92f
Reassign arena pointer instead of stomping on memory
2018-09-20 09:54:59 -07:00
Hope Casey-Allen
4b721fbde0
Destroy arena at end of benchmark to not leak memory
2018-09-19 20:51:45 -07:00
Hope Casey-Allen
29d9489ea9
Increase initial arena size to be more representative of real workload scenario and increase frequency of recreating the arena to avoid oom
2018-09-19 20:46:17 -07:00
Hope Casey-Allen
91727bd015
Move arena create outside of benchmark, format, and typo fix
2018-09-19 19:13:23 -07:00
Hope Casey-Allen
967bbcd5d3
Fixing benchmark name and adding a new one
2018-09-13 18:38:01 -07:00
Noah Eisen
58e0cbf9fb
Enable the performance-* clang-tidy checks
2018-06-14 14:58:09 -04:00
ncteisen
40ec89ff67
Support microbenchmarks internally
2018-04-25 17:41:23 -07:00
Vijay Pai
2f4161c210
Use stack frame size limits for consistency with internal builds
2018-03-05 16:43:32 -08:00
Noah Eisen
4d20a66685
Run clang fmt
2018-02-09 09:34:04 -08:00
Noah Eisen
be82e64b3d
Autofix c casts to c++ casts
2018-02-09 09:16:55 -08:00
Yash Tibrewal
8cf1470a51
Revert "Revert "All instances of exec_ctx being passed around in src/core removed""
2017-12-06 09:47:54 -08:00
Yash Tibrewal
ad4d2dde00
Revert "All instances of exec_ctx being passed around in src/core removed"
2017-12-06 09:05:05 -08:00
Yash Tibrewal
c354269ba7
Remove _ prefixed variable names
2017-11-29 19:07:44 -08:00
Yash Tibrewal
177039b2f8
Merge master
2017-11-16 19:31:28 -08:00
Yash Tibrewal
6c26b16fe0
Move ExecCtx to grpc_core namespace. Make exec_ctx a private static in ExecCtx and some minor changes
2017-11-14 18:11:22 -08:00
Yash Tibrewal
75122c2357
Address some PR comments
2017-11-14 01:36:28 -08:00
Craig Tiller
4ac2b8e585
Enable clang-tidy as a sanity check, fix up all known failures
2017-11-10 14:14:17 -08:00
Yash Tibrewal
0032548674
Correction to closure.cc,bm_chttp2_hpack and few more
2017-11-10 10:48:15 -08:00
Yash Tibrewal
3150744c71
Removing more exec_ctx instances
2017-11-09 18:27:37 -08:00
Yash Tibrewal
4e9265c828
Merge with master
2017-11-09 17:46:29 -08:00
Yash Tibrewal
40422d5fa6
Merge master
2017-11-06 14:43:31 -08:00
Craig Tiller
baa14a975e
Update clang-format to 5.0
2017-11-03 09:09:36 -07:00
Yash Tibrewal
39aed1ae8b
Remove unnecessary extern Cs
2017-10-25 17:04:35 -07:00
ncteisen
c296e82e11
clang fmt
2017-10-24 08:58:14 -07:00
ncteisen
9e3eedb6af
Remove old header benchmark
2017-10-24 08:33:00 -07:00
ncteisen
6bf4bcef04
Fix bm_diff
2017-10-23 22:19:01 -07:00
yang-g
83085aa74f
Add a microbm, seeing 195ns with current impl and 162ns with new impl
2017-10-19 16:11:06 -07:00
Yash Tibrewal
0ee7574732
Removing instances of exec_ctx being passed around in functions in
...
src/core. exec_ctx is now a thread_local pointer of type ExecCtx instead of
grpc_exec_ctx which is initialized whenever ExecCtx is instantiated. ExecCtx
also keeps track of the previous exec_ctx so that nesting of exec_ctx is
allowed. This means that there is only one exec_ctx being used at any
time. Also, grpc_exec_ctx_finish is called in the destructor of the
object, and the previous exec_ctx is restored to avoid breaking current
functionality. The code still explicitly calls grpc_exec_ctx_finish
because removing all such instances causes the code to break.
2017-10-18 17:12:19 -07:00
yang-g
c010d1d18a
Update benchmark according to new encoding method
2017-10-16 17:57:46 -07:00
yang-g
c94c7cc5b5
restore existing fixtures
2017-10-16 17:57:46 -07:00
yang-g
377636f4d2
Make hpack micro bm more representative
2017-10-16 17:57:46 -07:00
Mark D. Roth
bd3b93b4b5
Add support for Trailers-Only responses.
...
- When receiving a Trailers-Only response, return the metadata as
trailing metadata instead of initial metadata.
- Send Trailers-Only response when we have no non-default initial metadata,
no message to send, and trailing metadata to send.
2017-06-22 10:53:01 -07:00
Jan Tattermusch
7897ae9308
auto-fix most of licenses
2017-06-08 11:22:41 +02:00
Craig Tiller
85a747ed06
better representative output
2017-04-04 17:20:29 -07:00
Craig Tiller
e76a0ecc03
Update hpack benchmarks for true binary
2017-04-04 16:24:20 -07:00
Craig Tiller
eb0e34f736
Convert everything to new encode API
2017-04-04 08:46:47 -07:00
Craig Tiller
83643bd5cb
Fix build on mac
2017-03-31 06:02:57 -07:00
Craig Tiller
61c317b624
Fix leak
2017-03-29 13:56:24 -07:00
Craig Tiller
0d04e0697b
Add a benchmark of base16 encoding
2017-03-27 14:55:08 -07:00
Craig Tiller
e4a2419597
Bugfixes
2017-03-03 08:53:52 -08:00
Craig Tiller
5e3215338f
Move helpers to a common place, use them everywhere
2017-03-03 08:50:25 -08:00
Craig Tiller
681507aa24
Fix memory leak
2017-02-23 13:17:29 -08:00
Craig Tiller
523d54beeb
Refine to just be a HPACK benchmark
2017-02-23 08:52:38 -08:00