rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

why does rocketmq uses mmap+write , rather then sendfile

Open hdr893487191 opened this issue 5 years ago • 1 comments

I looked up some information and didn't understand why.

hdr893487191 avatar Mar 01 '21 07:03 hdr893487191

Compared with the large file transmission of sendfile, the small data transmission of mmap is more suitable for rocketmq. On the other hand, rocketmq is developed in java, large objects will have a certain impact on the garbage collection mechanism of jvm, so mmap is chosen

fengyiluo avatar Mar 01 '21 10:03 fengyiluo