What does Setting Write Buffer Watermark do?

int writeBufferHighWaterMark If the number of bytes in the network send buffer exceeds this value then the channel is no longer writeable, accepting no additional writes until buffer is drained and the writeBufferLowWaterMark is met. int writeBufferLowWaterMark Once the number of bytes queued in the network send buffer exceeds the high water mark, the channel will not become writeable again until the buffer is drained and it drops below this value. I am setting up a Janus Graph server. I got writeBufferHighWaterMark warning when I execute most of my queries. I figured I need to tune it (It says it will pause the response). What is this buffer and how should I tune it? Where can I monitor how my query filling up the buffer?
1 Reply
spmallette
spmallette16mo ago
if the client is "slow" in consuming what the server is sending, the server pauses to allow other threads to send responses to other clients. when the server detects that i can send again to the "slow" one it starts back up again. you could change these configurations but that just alters when the warning and pause is taken. you might only want to do that if you find the client isn't really busy in the first place. i think it's worth looking at that first. what is the client doing when you're getting that message? maybe it would be better to use a larger instance for the client that can consume the results without the pause? also, keep in mind that this throttling isn't necessarily bad. it's just a warning. if it happens very conssistently you might want to change something but periodically seeing it may not warrant a change. there is no monitor for the buffer. also note that these are netty configurations that are just exposed through our server. if you'd like more details on them you could check netty resources for more information.
Want results from more Discord servers?
Add your server