[avahi] Resolving many ( > 200 ) items seems to lead to apparent congestion in the dbus

Daniel Wynne daniel.wynne at mobotix.com
Tue Jun 30 02:25:37 PDT 2009


Daniel Wynne wrote:
> Lennart Poettering wrote:
>   
>> On Mon, 29.06.09 11:05, Daniel Wynne (daniel.wynne at mobotix.com) wrote:
>>
>>   
>>     
>>> Hi Trent!
>>>
>>> These are great news for us! :-)
>>> We were seriously concerned about the issue, that the Avahi mDNS 
>>> implementation prevented us from developing Linux camera management 
>>> applications for huge setups.
>>>
>>> In the following I provide a short calculation to give you a hint of 
>>> what we need:
>>>
>>>     - Right now we have setups with deployments of up to 800 devices We 
>>> do not think that deployments with even more devices in one network make 
>>> sense, as this already can be considered as a individual feasibility 
>>> study. But lets calculate with this worst case scenario and for the sake 
>>> of convenience we even round it up to N = 1000 devices per network.
>>>
>>>     - Since every device typically comes up with 2-3 ip addresses, we 
>>> have to reserve cache entries for N*( 3 A's, 1 PTR, 1 SRV, 1 TXT. ) => 
>>> AVAHI_CACHE_ENTRIES_MAX >= 6*N = 6000 entries.
>>>
>>>     - As the dbus limitations are concerned the maximum number of dbus 
>>> objects per client will have to be increased, too. Since we have to 
>>> create N*3 AddressRecordBrowsers, N*1 ServiceResolver, 1 Client, 2 
>>> ServiceBrowsers => OBJECTS_PER_CLIENT_MAX >= 4*N + 3 = 4003 ~ 4000 entries
>>>
>>> As I do not have that much insight into the Avahi-code there might be 
>>> even more limits that might have to be adapted to achieve a coherent 
>>> configuration.
>>>
>>> If you need any additional information, let me know.
>>>
>>> Thank you Guys for the great support so far!
>>>     
>>>       
>> Hmm, with allowing more simulatenous clients the memory usage of the
>> cache will increase too. I wonder how bad that actually wuld
>> be. I.e. Daniel, how does the VSZ of the avahi daemon change when
>> connected to a en empty network vs. one of your fully equipped ones?
>>
>> Lennart
>>
>>   
>>     
>
> Hi Lennart,
>
> I could not test it with the 800 devices but at least with a network of 
> about 250 devices.
> These are the results:
>
> Original Parameters:
>
> AVAHI_CACHE_ENTRIES_MAX = 500
> OBJECTS_PER_CLIENT_MAX = 500
>
> Changed Parameters:
>
> AVAHI_CACHE_ENTRIES_MAX = 6000
> OBJECTS_PER_CLIENT_MAX = 4000
>
>
> Original Configuration, 2 Devices in the network
> avahi-daemon uses 352 K
>
> Original Configuration, 250 Devices in the network
> avahi-daemon uses 1,820 K ( about 90 services were found at first, after 
> time number increases but never reaches the actual number of services in 
> the network, even after hours )
>
> Changed Configuration, 250 Devices in the network
> avahi-daemon uses 352 K
>
> Changed Configuration, 250 Devices in the network
> avahi-daemon uses 2,764 K ( as all services were found immediately )
>
>
> Hope it helps! If you need more info let me know!
>
>
> Daniel
>
>
> _______________________________________________
> avahi mailing list
> avahi at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/avahi
>   

BTW

You could also make the cache size configurable with a maximum allowed 
size. This would help the one side without affecting the other...


-- 
---------------------------------------------------------------------
Daniel Wynne, Softwareentwicklung
MOBOTIX AG - Security Vision Systems
Luxemburger Straße 6, 67657 Kaiserslautern
---------------------------------------------------------------------
daniel.wynne at mobotix.com, http://www.mobotix.com
---------------------------------------------------------------------
Vorstandvorsitzender: Dr. Ralf Hinkel
Vorstandsmitglieder: Lutz Coelen, Horst Pfiffi
Aufsichtsratsvorsitzender: Dr. Thomas Hoch
Registergericht: HRB Kaiserslautern 3724  



More information about the avahi mailing list