helidon-io / helidon

Java libraries for writing microservices
https://helidon.io
Apache License 2.0
3.5k stars 565 forks source link

4.x: Update performance tuning doc still mentioning Netty #8102

Closed danielkec closed 10 months ago

danielkec commented 10 months ago

https://helidon.io/docs/v4/#/mp/guides/performance-tuning

barchetta commented 10 months ago

Most of the current document is no longer applicable -- because we no longer use Netty and because we no longer need to manage thread pool sizes. Yay!

Here are some rough dumps of properties we can consider covering in a tuning guide (thanks to @danielkec) :

  # Depends on the workload and kernel version
  backlog: 8192
  receive-buffer-size: 64000
  write-queue-length: 32 # 0 means direct write

  # Depends on the workload and kernel version
  connection-options:
    # 0 mean indefinite(and less clutter on socket impl)
    read-timeout: PT0S     
    connect-timeout: PT0S

    # Can make quite difference between Mac, Linux kernels < 5.15 and Linux kernels > 5.15
    tcp-no-delay: true

    # when set, TCP autotuning is off(auto-tuning is better for variable or large payloads)
    socket-send-buffer-size: 64000     
    socket-receive-buffer-size: 64000

  # Turn off safety features
  # Carefull with this! Can be dangerous in production!
  protocols:
    "http_1_1":
      validate-request-headers: false
      validate-response-headers: false
      validate-path: false
      recv-log: false
      send-log: false
Some possible options to cover:

WebServer:
backlog
idle-connection-period
idle-connection-timeout
max-concurrent-requests
max-in-memory-entity
max-payload-size
max-tcp-connections
receive-buffer-size
write-buffer-size
write-queue-length

SocketOptions:
socket-receive-buffer-size
socket-send-buffer-size
tcp-no-delay