@@ -91,7 +91,7 @@ typedef struct fd_rpc_shred_map_elem fd_rpc_shred_map_elem_t;
91
91
#define POOL_T fd_rpc_shred_map_elem_t
92
92
#include "../../util/tmpl/fd_pool.c"
93
93
94
- #define FD_SHRED_MAP_COL_CNT (64UL )
94
+ #define FD_SHRED_MAP_COL_CNT (1UL<<10 )
95
95
struct fd_rpc_shred_map {
96
96
struct fd_rpc_shred_map_column {
97
97
ulong max_idx ; /* The max shred index set in this column + 1 */
@@ -141,7 +141,7 @@ fd_rpc_history_create(fd_rpcserver_args_t * args) {
141
141
mem = fd_spad_alloc ( spad , alignof(fd_rpc_shred_map_t ), sizeof (fd_rpc_shred_map_t ) );
142
142
memset (mem , 0 , sizeof (fd_rpc_shred_map_t ));
143
143
hist -> shred_map = (fd_rpc_shred_map_t * )mem ;
144
- static const ulong shred_pool_sz = 1024UL * 128UL ;
144
+ static const ulong shred_pool_sz = 1024UL * 256UL ;
145
145
mem = fd_spad_alloc ( spad , fd_rpc_shred_pool_align (), fd_rpc_shred_pool_footprint ( shred_pool_sz ) );
146
146
hist -> shred_pool = fd_rpc_shred_pool_join ( fd_rpc_shred_pool_new ( mem , shred_pool_sz ) );
147
147
@@ -180,11 +180,15 @@ fd_rpc_history_alloc_block(fd_rpc_history_t * hist, ulong slot) {
180
180
void
181
181
fd_rpc_history_debug (fd_rpc_history_t * hist ) {
182
182
fd_rpc_shred_map_t * shred_map = hist -> shred_map ;
183
+ ulong tot_cnt = 0 ;
183
184
for ( ulong slot = shred_map -> tail ; slot < shred_map -> head ; slot ++ ) {
184
185
ulong col_idx = slot & (FD_SHRED_MAP_COL_CNT - 1 );
185
186
struct fd_rpc_shred_map_column * col = & shred_map -> cols [col_idx ];
186
187
FD_LOG_NOTICE (( "slot %lu: %lu shreds, %lu max, %d end_found" , slot , col -> used_cnt , col -> max_idx , (int )col -> end_found ));
188
+ tot_cnt += col -> used_cnt ;
187
189
}
190
+ FD_LOG_NOTICE (( "%lu head, %lu tail, %lu total shreds, %lu total blocks" ,
191
+ shred_map -> head , shred_map -> tail , tot_cnt , shred_map -> head - shred_map -> tail ));
188
192
}
189
193
190
194
void
0 commit comments