If you have a plugin implementing a response transform and the data sending to the UA is slow TS will use huge amounts of memory for larger files. (e.g. 16G Vsize for a 50M file.)
This seems to be several problems combined, first, the MIOBuffer used for the chunking tunnel uses 2M buffers, and when handling data from a transform it ends up putting just the chunk markers in a buffer, then gets a buffer from the transform, then a new 2M buffer...Once I fix that, 50M files are ok, but 1G files still exhaust memory as they end up all in memory because there is no flow-control in some of the VConnections and such between a transform and the chunking tunnel. I did a lame patch that I need to revise that fixed the problem by making TransformTerminus not send data if the destination that it is writing to has too much data in it, plus I made my plugin check how much data the destination for the transform has and don't write to it then either. But it seems like I need to find the other side of both of those, and suppress WRITE_READY (and maybe IMMEDIATE) event sending when they are full, but I haven't been able to figure out what the other side is for those yet.