# Multicast packets

**URL:** <https://discuss.elastic.co/t/multicast-packets/2921>\
**Category:** Elasticsearch\
**Created:** [April 20, 2010, 12:15pm UTC](https://discuss.elastic.co/t/multicast-packets/2921 "2010-04-20T12:15:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Szymon\_Gwozdz](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Szymon\_Gwozdz](https://discuss.elastic.co/u/Szymon_Gwozdz)\
**Post date:** [April 20, 2010, 12:15pm UTC](https://discuss.elastic.co/t/multicast-packets/2921/1 "2010-04-20T12:15:12Z")

</div>

Hi!

When I'm launching ElasticSearch I get logs like this:

[13:48:24,418][WARN][jgroups.UDP] send buffer of socket  
java.net.DatagramSocket@46b29c9d was set to 640KB, but the OS only allocated  
167.77KB. This might lead to performance problems. Please set your max send  
buffer in the OS correctly (e.g. net.core.wmem\_max on Linux)  
[13:48:24,418][WARN][jgroups.UDP] receive buffer of socket  
java.net.DatagramSocket@46b29c9d was set to 20MB, but the OS only allocated  
524.29KB. This might lead to performance problems. Please set your max  
receive buffer in the OS correctly (e.g. net.core.rmem\_max on Linux)  
[13:48:24,418][WARN][jgroups.UDP] send buffer of socket  
java.net.MulticastSocket@7846a55e was set to 640KB, but the OS only  
allocated 167.77KB. This might lead to performance problems. Please set your  
max send buffer in the OS correctly (e.g. net.core.wmem\_max on Linux)  
[13:48:24,418][WARN][jgroups.UDP] receive buffer of socket  
java.net.MulticastSocket@7846a55e was set to 25MB, but the OS only allocated  
524.29KB. This might lead to performance problems. Please set your max  
receive buffer in the OS correctly (e.g. net.core.rmem\_max on Linux)

How can I change this buffer in java (not in system, I don't want to change  
system values)? I've tried with something like this:

discovery:  
jgroups:  
config: udp  
mcast\_send\_buf\_size: 10000  
mcast\_recv\_buf\_size: 10000  
ucast\_send\_buf\_size: 10000  
ucast\_recv\_buf\_size: 10000

but it didn't work (i had the same values in logs as before) ☹

I have to get rid of these warnings, because network in my company is  
rejecting multicast messages with too many packets - admins sent me logs  
like this:

Discard IP fragment set with more than 24 elements: src = 10.1.112.214, dest  
= 228.8.8.8, proto = udp, id = 18373

And probably because of this after few minutes of feeding elasticsearch with  
data I have logs like this:

[12:28:16,346][WARN][jgroups.pbcast.NAKACK] test-4-16470: dropped  
message from test-5-22451 (not in xmit\_table), keys are [test-4-16470,  
test-3-24681, test-2-34614, test-1-48736], view=[test-1-48736|9]  
[test-1-48736, test-3-24681, test-4-16470, test-2-34614]

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 20, 2010, 5:59pm UTC](https://discuss.elastic.co/t/multicast-packets/2921/2 "2010-04-20T17:59:29Z")

</div>

This values are recommended values for jgroups when using multicast. You can  
move to use unicast if you don't want to use multicast or change the values  
on the os level.

cheers,  
shay.banon

On Tue, Apr 20, 2010 at 3:15 PM, Szymon Gwóźdź [sz.gwozdz@gmail.com](mailto:sz.gwozdz@gmail.com) wrote:

> Hi!
> 
> When I'm launching Elasticsearch I get logs like this:
> 
> [13:48:24,418][WARN][jgroups.UDP] send buffer of socket  
> java.net.DatagramSocket@46b29c9d was set to 640KB, but the OS only  
> allocated 167.77KB. This might lead to performance problems. Please set your  
> max send buffer in the OS correctly (e.g. net.core.wmem\_max on Linux)  
> [13:48:24,418][WARN][jgroups.UDP] receive buffer of socket  
> java.net.DatagramSocket@46b29c9d was set to 20MB, but the OS only  
> allocated 524.29KB. This might lead to performance problems. Please set your  
> max receive buffer in the OS correctly (e.g. net.core.rmem\_max on Linux)  
> [13:48:24,418][WARN][jgroups.UDP] send buffer of socket  
> java.net.MulticastSocket@7846a55e was set to 640KB, but the OS only  
> allocated 167.77KB. This might lead to performance problems. Please set your  
> max send buffer in the OS correctly (e.g. net.core.wmem\_max on Linux)  
> [13:48:24,418][WARN][jgroups.UDP] receive buffer of socket  
> java.net.MulticastSocket@7846a55e was set to 25MB, but the OS only  
> allocated 524.29KB. This might lead to performance problems. Please set your  
> max receive buffer in the OS correctly (e.g. net.core.rmem\_max on Linux)
> 
> How can I change this buffer in java (not in system, I don't want to change  
> system values)? I've tried with something like this:
> 
> discovery:  
> jgroups:  
> config: udp  
> mcast\_send\_buf\_size: 10000  
> mcast\_recv\_buf\_size: 10000  
> ucast\_send\_buf\_size: 10000  
> ucast\_recv\_buf\_size: 10000
> 
> but it didn't work (i had the same values in logs as before) ☹
> 
> I have to get rid of these warnings, because network in my company is  
> rejecting multicast messages with too many packets - admins sent me logs  
> like this:
> 
> Discard IP fragment set with more than 24 elements: src = 10.1.112.214,  
> dest = 228.8.8.8, proto = udp, id = 18373
> 
> And probably because of this after few minutes of feeding elasticsearch  
> with data I have logs like this:
> 
> [12:28:16,346][WARN][jgroups.pbcast.NAKACK] test-4-16470: dropped  
> message from test-5-22451 (not in xmit\_table), keys are [test-4-16470,  
> test-3-24681, test-2-34614, test-1-48736], view=[test-1-48736|9]  
> [test-1-48736, test-3-24681, test-4-16470, test-2-34614]

---

<div class="post-metadata">

**Author:** ![Szymon\_Gwozdz](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Szymon\_Gwozdz](https://discuss.elastic.co/u/Szymon_Gwozdz)\
**Post date:** [April 21, 2010, 8:30am UTC](https://discuss.elastic.co/t/multicast-packets/2921/3 "2010-04-21T08:30:44Z")

</div>

Yes, but could you explain me why my discovery.jgroups config isn't working?

Regards  
Szymon Gwóźdź

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [April 21, 2010, 5:39pm UTC](https://discuss.elastic.co/t/multicast-packets/2921/4 "2010-04-21T17:39:42Z")

</div>

Yea, its because they are (sadly) not configured to be injected using system  
properties (which is what I do when you pass them in the elasticsearch.yml  
configuration). You can create your own copy of the udp.xml file, and place  
it under config/jgroups location, and change it.

cheers,  
shay.banon

2010/4/21 Szymon Gwóźdź [sz.gwozdz@gmail.com](mailto:sz.gwozdz@gmail.com)

> Yes, but could you explain me why my discovery.jgroups config isn't  
> working?
> 
> Regards  
> Szymon Gwóźdź

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:24am UTC](https://discuss.elastic.co/t/multicast-packets/2921/5 "2017-07-06T04:24:27Z")

</div>


