Because it's a circular buffer, fragments are "garbage collected" by the write cursor wrapping around and overwriting them. The difficulty in making fragments for a single object contiguous is the data arrives non-contiguously. The memory cost of buffering the data would be very large along with likely starvation issues. It might be possible to do something during an evacuation but I don't see that being implement anytime in the near future.
On Wednesday, May 31, 2017, 12:35:53 AM CDT, Anh Le Duc (2) <anh...@vng.com.vn> wrote:Hi guys, It's stated that (in section Object Structure <https://docs.trafficserver.apache.org/en/latest/developer-guide/cache-architecture/architecture.en.html#object-structure> ): Note that while the fragments of a single object are ordered they are not necessarily contiguous, as data from different objects are interleaved as the data arrives in Traffic Server. ATS has it own garbage collector, right? There's not so much documentation about the collector. I wonder if the collector re-orders fragments so that fragments belonging to a certain object have chances of becoming closer together. The reason behind this question is: I think it's better for overall performance if objects can be stored contiguously. Please correct me if I'm wrong. Thanks for your time! -- *Anh Le (Mr.)* *Senior Software Engineer* *Zalo Technical Dept., Zalo Group, **VNG Corporation* 5th floor, D29 Building, Pham Van Bach Street, Hanoi, Vietnam *M:* (+84) 987 816 461 *E:* anh...@vng.com.vn *W: *www.vng.com.vn <http://www.google.com/url?q=http%3A%2F%2Fwww.vng.com.vn&sa=D&sntz=1&usg=AFQjCNHYo7I_1mPESzfIvCNjLtAJOq8xsg> *“Make the Internet change Vietnamese lives”*