There's a closed pull request on the mblaze repository mthread: reduce memory usage https://github.com/leahneukirchen/mblaze/pull/222 Description: mthread keeps header data of all messages in memory until it exits without ever using it. With this change it frees the header data of each message right after processing it. With my test data of ~100000 messages (10GB) passed to mthread with `-S` this change reduces the peak memory usage from 841MB to 27MB.