作者:一个不起眼的小人物 | 来源:互联网 | 2023-09-09 14:11
I am currently running into an issue whereby the Media Driver is garbage collecting ~150mb every 2 – 3 hours. After looking at a few heap dumps, it appears that there are a number of InetAddress and InetSocketAddress objects being created whenever a StatusMesage is received. I’ve tried debugging and my current findings are:
Media Drivers send out a StatusMessage every 200ms to a publisher of a stream
When the MediaDriver receives the StatusMessage, it attempts to read the message using the DatagramChannelImpl
Within the receive0 method of the DatagramChannelImpl.c there is a comparison of the Sender Address and CachedSenderInetAddress
If these do not match, new instances of the InetAddress and InetSocketAddress are created and the cachedSenderInetAddress is updated
If the Media Driver is receiving Status Messages from multiple different sources, then the cachedInetSenderAddress will keep flipping between the addresses
Each time a Status Message is received, the comparison fails and a new object is created
Aeron Version
- First experienced on 1.8.1
- Upgraded to 1.10.5 and still experiencing
JAVA Version
- 1.8.0_171
Kernel Version
- 3.10.0-862.9.1.el7.x86_64
Steps to reproduce:
- Run Media Driver on machines A, B and C
- Publish on stream 1 from Machine A
- Subscribe on stream 1 from Machine B and C
- Observe InetAddress/InetSocketAddress objects created on Machine A after each received Status Message from B and C
Any help would be much appreciated, please let me know any more information is needed.
该提问来源于开源项目:real-logic/aeron
Thanks - I'll look into using that.