You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's at least two 4KB buffers per connection (Ocsigen_http_com.create_receiver), plus a 8KB buffer for serving files (4KB one for chunked responses), plus a 8KB one for deflatemod. So serving e.g. a static HTML/CSS asset (undergoing compression) allocates 24KB which go right to the major heap and become garbage as soon as we close the connection. This increases GC load, trashes the cache, etc. (see #49 for a dramatic example). Also, Lwt_bytes.t buffers lie outside OCaml's heaps and are collected at the GC's whim (probably quite late), so that memory usage grows quickly and the heap becomes fragmented.
This can be easily prevented by pooling such buffers.
The text was updated successfully, but these errors were encountered:
There are a few places where ocsigenserver allocates 1KB-, 4KB- and 8KB buffers. You can get them (along with some context) with
There's at least two 4KB buffers per connection (
Ocsigen_http_com.create_receiver
), plus a 8KB buffer for serving files (4KB one for chunked responses), plus a 8KB one for deflatemod. So serving e.g. a static HTML/CSS asset (undergoing compression) allocates 24KB which go right to the major heap and become garbage as soon as we close the connection. This increases GC load, trashes the cache, etc. (see #49 for a dramatic example). Also,Lwt_bytes.t
buffers lie outside OCaml's heaps and are collected at the GC's whim (probably quite late), so that memory usage grows quickly and the heap becomes fragmented.This can be easily prevented by pooling such buffers.
The text was updated successfully, but these errors were encountered: