#ifndef MP_FREELIST_SIZE
#define MP_FREELIST_SIZE 32 /**< Maximum length of the worker mempool freelist */
#endif
+#ifndef RECVMMSG_BATCH
+#define RECVMMSG_BATCH 8
+#endif
/*
* @internal These are forward decls to allow building modules with engine but without Lua.
pool.ctx = array_tail(worker->pools);
array_pop(worker->pools);
} else { /* No mempool on the freelist, create new one */
- pool.ctx = mp_new (16 * CPU_PAGE_SIZE);
+ pool.ctx = mp_new (20 * CPU_PAGE_SIZE);
}
/* Create worker task */
struct engine *engine;
uv_loop_t *loop;
mm_ctx_t *mm;
- uint8_t wire_buf[4 * KNOT_WIRE_MAX_PKTSIZE];
+#if __linux__
+ uint8_t wire_buf[RECVMMSG_BATCH * KNOT_WIRE_MAX_PKTSIZE];
+#else
+ uint8_t wire_buf[KNOT_WIRE_MAX_PKTSIZE];
+#endif
struct {
size_t concurrent;
size_t udp;
size_t tcp;
} stats;
mp_freelist_t pools;
+ mp_freelist_t ioreqs;
};
/**