possible to increase 512 byte maximum tag length?

135 views
Skip to first unread message

Matt Ho

unread,
May 23, 2014, 7:12:25 PM5/23/14
to ser...@googlegroups.com
Adding tags to serf, we're beginning to see the following errors:

Encoded length of tags exceeds limit of 512 bytes

Is there any reason this limit can't be raised to something a little larger, say 2k?

M

Armon Dadgar

unread,
May 23, 2014, 7:22:58 PM5/23/14
to Matt Ho, ser...@googlegroups.com
Matt,

We are restricted by the size of a UDP packet (~1400 bytes).
For all of the various headers that Serf already includes, we use 512
as a conservative limit to the tag size. If the meta data is too large
it will affect convergence time as each node will consume an entire UDP packet.

Best Regards,
Armon Dadgar
--
You received this message because you are subscribed to the Google Groups "Serf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to serfdom+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Ho

unread,
May 23, 2014, 7:43:52 PM5/23/14
to ser...@googlegroups.com, Matt Ho
Aha, gotcha.  Thanks!

M

Khuzema Pithewan

unread,
Apr 11, 2017, 6:38:41 PM4/11/17
to Serf, mat...@gmail.com
Hi Armon,

Why can't IP fragmentation and reassembly kick in and take care of larger UDP packets. gossip can tolerate packet losses, may affect convergence slightly, but its useful to have this flexibility if needed.

Further, most LANs support jumbo size frames going upto 8192 bytes, so IP fragmentation may not happen till then.

thanks
Khuzema

Armon Dadgar

unread,
Apr 11, 2017, 9:25:24 PM4/11/17
to ser...@googlegroups.com, Khuzema Pithewan, mat...@gmail.com
Hey Khuzema,

Serf is meant to work in a broad set of environments, which is why we make minimal assumptions (no multicast, broadcast, jumbo frames, reassembly, conservative MTU, etc).
There are of course assumptions that make sense in specific environments, but they are not generally applicable to all the places Serf is run.

Hope that helps explain the reasoning!

Best Regards,
Armon Dadgar
--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/serf/issues
IRC: #serfdom on Freenode
---

You received this message because you are subscribed to the Google Groups "Serf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to serfdom+u...@googlegroups.com.

Khuzema Pithewan

unread,
Apr 11, 2017, 10:24:59 PM4/11/17
to Armon Dadgar, ser...@googlegroups.com, mat...@gmail.com
Hi Armon,

Agee with minimal assumptions as defaults. But IMHO, it should be made configurable, so that more capable environment can take advantage of that.

Thanks
Khuzema

Sent from my iPhone

Armon Dadgar

unread,
Apr 11, 2017, 10:29:00 PM4/11/17
to Khuzema Pithewan, mat...@gmail.com, ser...@googlegroups.com
Hey,

You are free to change the constants and recompile, they are relatively localized in where they are. When we make it configurable there is an expectation of support on the mailing list, issues, and IRC which are a burden for us to investigate and understand when the issues are environment specific. Given the large surface area of our open source efforts this is something we are very sensitive to. For the vast majority, the defaults do not interfere with their usage which is our goal. 

Best Regards,

Armon Dadgar

Sent from Outlook Mobile

From: Khuzema Pithewan <khuz...@gmail.com>
Sent: Tuesday, April 11, 2017 7:24:56 PM
To: Armon Dadgar
Cc: ser...@googlegroups.com; mat...@gmail.com
Subject: Re: [serf] Re: possible to increase 512 byte maximum tag length?
 

Khuzema Pithewan

unread,
Apr 11, 2017, 10:46:45 PM4/11/17
to Armon Dadgar, mat...@gmail.com, ser...@googlegroups.com
Got it. Will try that out.

Thanks
Khuzema

Sent from my iPhone

James Phillips

unread,
Apr 12, 2017, 2:15:25 AM4/12/17
to ser...@googlegroups.com, Armon Dadgar, mat...@gmail.com
This got pulled out into a config you can tweak here if you recompile:

https://github.com/hashicorp/memberlist/blob/master/config.go#L200-L207

via:

https://github.com/hashicorp/serf/blob/master/serf/config.go#L237-L267

(would require a minor shuffle to make the config and then override
UDPBufferSize afterwards.
> https://groups.google.com/d/msgid/serfdom/C5F2C6F7-27F7-4186-A4FB-2A5F1807F247%40gmail.com.

Khuzema Pithewan

unread,
Apr 13, 2017, 4:55:17 PM4/13/17
to ser...@googlegroups.com
I changed following constants :

In file memberlist/config.go : changed "UDPBufferSize"     from 1400  to 65536

In file memberlist/net.go : changed "MetaMaxSize" from 512 to 20480 (to allow larger number of tags)

tested it. holding up well so far.

btw, I see memory growth with increasing number of serf Agents in a cluster. Is it known issue?
 
thanks
Khuzema





> To view this discussion on the web visit
> https://groups.google.com/d/msgid/serfdom/48d055a9-e1e3-420a-ac31-5ad5a861474d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/hashicorp/serf/issues
> IRC: #serfdom on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Serf" group.
> To unsubscribe from this group and stop receiving emails from it, send an

> To view this discussion on the web visit
>
> For more options, visit https://groups.google.com/d/optout.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/serf/issues
IRC: #serfdom on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Serf" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/serfdom/BbIpZ1YjiMw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to serfdom+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/serfdom/CAGoWc043upqiY7d-3360VJx0hzcWRNinhMnVofOQ_-1N-8_m9A%40mail.gmail.com.

Armon Dadgar

unread,
Apr 13, 2017, 5:00:21 PM4/13/17
to ser...@googlegroups.com, Khuzema Pithewan
Khuzema,

Glad to hear it! Memory should be linear with the size of the cluster, as the metadata to track increases.
Shouldn’t be unbounded however, if you see that let us know.

Best Regards,
Armon Dadgar
To unsubscribe from this group and stop receiving emails from it, send an email to serfdom+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/serfdom/CAO7L%3DKsu%3DDNBSs%3DLJd-TL3rqz_EEm4E4C%2BqKUm1fGX9Em537Ww%40mail.gmail.com.

James Phillips

unread,
Apr 13, 2017, 5:03:16 PM4/13/17
to ser...@googlegroups.com
> btw, I see memory growth with increasing number of serf Agents in a cluster. Is it known issue?

There's a small amount of bookkeeping per agent, but it's not much.
What sort of growth are you seeing?
>> > email to serfdom+u...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/serfdom/48d055a9-e1e3-420a-ac31-5ad5a861474d%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>> > --
>> > This mailing list is governed under the HashiCorp Community Guidelines -
>> > https://www.hashicorp.com/community-guidelines.html. Behavior in
>> > violation
>> > of those guidelines may result in your removal from this mailing list.
>> >
>> > GitHub Issues: https://github.com/hashicorp/serf/issues
>> > IRC: #serfdom on Freenode
>> > ---
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Serf" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to serfdom+u...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/serfdom/C5F2C6F7-27F7-4186-A4FB-2A5F1807F247%40gmail.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> This mailing list is governed under the HashiCorp Community Guidelines -
>> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
>> of those guidelines may result in your removal from this mailing list.
>>
>> GitHub Issues: https://github.com/hashicorp/serf/issues
>> IRC: #serfdom on Freenode
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Serf" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/serfdom/BbIpZ1YjiMw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> serfdom+u...@googlegroups.com.
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/hashicorp/serf/issues
> IRC: #serfdom on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Serf" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to serfdom+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/serfdom/CAO7L%3DKsu%3DDNBSs%3DLJd-TL3rqz_EEm4E4C%2BqKUm1fGX9Em537Ww%40mail.gmail.com.

Khuzema Pithewan

unread,
Apr 13, 2017, 5:56:32 PM4/13/17
to ser...@googlegroups.com
Hi Armon, James:

I tested running large number of agents. started with 1 agent and then added added 10 at a time to same cluster growing number of agents to about 200.

On an average agent starts with memory footprint of about 5 MB and then grows rapidly (very visible). Pls note I am not adding any tags dynamically, so total amount of information remains constant, but memory consumption grows.

I didn't save memory readings. I was using top with 1 sec polling to check memory growth.
I am using "Ubuntu 16.04 LTS (GNU/Linux 4.4.0-64-generic x86_64)"

Thanks
Khuzema



>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/serfdom/48d055a9-e1e3-420a-ac31-5ad5a861474d%40googlegroups.com.
>> > For more options, visit https://groups.google.com/d/optout.
>> >
>> > --
>> > This mailing list is governed under the HashiCorp Community Guidelines -
>> > https://www.hashicorp.com/community-guidelines.html. Behavior in
>> > violation
>> > of those guidelines may result in your removal from this mailing list.
>> >
>> > GitHub Issues: https://github.com/hashicorp/serf/issues
>> > IRC: #serfdom on Freenode
>> > ---
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Serf" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an

>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/serfdom/C5F2C6F7-27F7-4186-A4FB-2A5F1807F247%40gmail.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> This mailing list is governed under the HashiCorp Community Guidelines -
>> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
>> of those guidelines may result in your removal from this mailing list.
>>
>> GitHub Issues: https://github.com/hashicorp/serf/issues
>> IRC: #serfdom on Freenode
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Serf" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/serfdom/BbIpZ1YjiMw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to

>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/serfdom/CAGoWc043upqiY7d-3360VJx0hzcWRNinhMnVofOQ_-1N-8_m9A%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/hashicorp/serf/issues
> IRC: #serfdom on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Serf" group.
> To unsubscribe from this group and stop receiving emails from it, send an

> To view this discussion on the web visit
>
> For more options, visit https://groups.google.com/d/optout.

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/hashicorp/serf/issues
IRC: #serfdom on Freenode
---
You received this message because you are subscribed to a topic in the Google Groups "Serf" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/serfdom/BbIpZ1YjiMw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to serfdom+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/serfdom/CAGoWc07fry%3Dr8JjTp3PpNst05VwoENjA0AC1HeFKU8NKHWN6uw%40mail.gmail.com.

James Phillips

unread,
Jun 1, 2017, 12:38:51 AM6/1/17
to ser...@googlegroups.com
Hi Khuzema sorry for the late reply. Was it unbounded growth or
proportional to the size of the cluster?
>> >> > email to serfdom+u...@googlegroups.com.
>> >> > To view this discussion on the web visit
>> >> >
>> >> >
>> >> > https://groups.google.com/d/msgid/serfdom/48d055a9-e1e3-420a-ac31-5ad5a861474d%40googlegroups.com.
>> >> > For more options, visit https://groups.google.com/d/optout.
>> >> >
>> >> > --
>> >> > This mailing list is governed under the HashiCorp Community
>> >> > Guidelines -
>> >> > https://www.hashicorp.com/community-guidelines.html. Behavior in
>> >> > violation
>> >> > of those guidelines may result in your removal from this mailing
>> >> > list.
>> >> >
>> >> > GitHub Issues: https://github.com/hashicorp/serf/issues
>> >> > IRC: #serfdom on Freenode
>> >> > ---
>> >> > You received this message because you are subscribed to the Google
>> >> > Groups
>> >> > "Serf" group.
>> >> > To unsubscribe from this group and stop receiving emails from it,
>> >> > send
>> >> > an
>> >> > email to serfdom+u...@googlegroups.com.
>> >> > To view this discussion on the web visit
>> >> >
>> >> >
>> >> > https://groups.google.com/d/msgid/serfdom/C5F2C6F7-27F7-4186-A4FB-2A5F1807F247%40gmail.com.
>> >> >
>> >> > For more options, visit https://groups.google.com/d/optout.
>> >>
>> >> --
>> >> This mailing list is governed under the HashiCorp Community Guidelines
>> >> -
>> >> https://www.hashicorp.com/community-guidelines.html. Behavior in
>> >> violation
>> >> of those guidelines may result in your removal from this mailing list.
>> >>
>> >> GitHub Issues: https://github.com/hashicorp/serf/issues
>> >> IRC: #serfdom on Freenode
>> >> ---
>> >> You received this message because you are subscribed to a topic in the
>> >> Google Groups "Serf" group.
>> >> To unsubscribe from this topic, visit
>> >> https://groups.google.com/d/topic/serfdom/BbIpZ1YjiMw/unsubscribe.
>> >> To unsubscribe from this group and all its topics, send an email to
>> >> serfdom+u...@googlegroups.com.
>> >> To view this discussion on the web visit
>> >>
>> >> https://groups.google.com/d/msgid/serfdom/CAGoWc043upqiY7d-3360VJx0hzcWRNinhMnVofOQ_-1N-8_m9A%40mail.gmail.com.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> > --
>> > This mailing list is governed under the HashiCorp Community Guidelines -
>> > https://www.hashicorp.com/community-guidelines.html. Behavior in
>> > violation
>> > of those guidelines may result in your removal from this mailing list.
>> >
>> > GitHub Issues: https://github.com/hashicorp/serf/issues
>> > IRC: #serfdom on Freenode
>> > ---
>> > You received this message because you are subscribed to the Google
>> > Groups
>> > "Serf" group.
>> > To unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to serfdom+u...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/serfdom/CAO7L%3DKsu%3DDNBSs%3DLJd-TL3rqz_EEm4E4C%2BqKUm1fGX9Em537Ww%40mail.gmail.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> This mailing list is governed under the HashiCorp Community Guidelines -
>> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
>> of those guidelines may result in your removal from this mailing list.
>>
>> GitHub Issues: https://github.com/hashicorp/serf/issues
>> IRC: #serfdom on Freenode
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Serf" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/serfdom/BbIpZ1YjiMw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> serfdom+u...@googlegroups.com.
> --
> This mailing list is governed under the HashiCorp Community Guidelines -
> https://www.hashicorp.com/community-guidelines.html. Behavior in violation
> of those guidelines may result in your removal from this mailing list.
>
> GitHub Issues: https://github.com/hashicorp/serf/issues
> IRC: #serfdom on Freenode
> ---
> You received this message because you are subscribed to the Google Groups
> "Serf" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to serfdom+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/serfdom/CAO7L%3DKtn0YnPuR%3DC7D0SJ%3DbLNmmYecKgmi715pUiy9LQwg%3DHxA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages