Netdb. state too big

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Netdb. state too big

Antonino Sanacori
  Hello.

My log/squid/netdb.state is 534MB, how can i reduce his size?

On my Debian 9 can I use logrotate to rotate the file?

Regards.

Antonino

--

______________________________________________

Antonino Sanacori



--


Informativa sulla Privacy: http://www.unibs.it/node/8155 
<http://www.unibs.it/node/8155>
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: [ext] Netdb. state too big

Ralf Hildebrandt
* Antonino Sanacori <[hidden email]>:
>  Hello.
>
> My log/squid/netdb.state is 534MB, how can i reduce his size?
>
> On my Debian 9 can I use logrotate to rotate the file?

You could disable it:
http://www.squid-cache.org/Doc/config/netdb_filename/

--
Ralf Hildebrandt                   Charite Universitätsmedizin Berlin
[hidden email]        Campus Benjamin Franklin
https://www.charite.de             Hindenburgdamm 30, 12203 Berlin
Geschäftsbereich IT, Abt. Netzwerk fon: +49-30-450.570.155
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: [ext] Netdb. state too big

Ralf Hildebrandt
* Ralf Hildebrandt <[hidden email]>:
> * Antonino Sanacori <[hidden email]>:
> >  Hello.
> >
> > My log/squid/netdb.state is 534MB, how can i reduce his size?
> >
> > On my Debian 9 can I use logrotate to rotate the file?
>
> You could disable it:
> http://www.squid-cache.org/Doc/config/netdb_filename/

http://etutorials.org/Server+Administration/Squid.+The+definitive+guide/Chapter+10.+Talking+to+Other+Squids/10.5+The+Network+Measurement+Database/
talks about "When the number of stored subnets reaches netdb_high,
Squid deletes the least recently used entries until the count is less
than netdb_low."

The question being: do you actually need this?

--
Ralf Hildebrandt                   Charite Universitätsmedizin Berlin
[hidden email]        Campus Benjamin Franklin
https://www.charite.de             Hindenburgdamm 30, 12203 Berlin
Geschäftsbereich IT, Abt. Netzwerk fon: +49-30-450.570.155
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: [ext] Netdb. state too big

Antonino Sanacori
Hello Ralf.

I have not the typical record format visible in link
http://etutorials.org... but many record as this:

x.y.z.a 8.0000 23.0000 1523875740 1523876930 ip server address

no subnet.

Il 09/01/2019 10:43, Ralf Hildebrandt ha scritto:

> * Ralf Hildebrandt <[hidden email]>:
>> * Antonino Sanacori <[hidden email]>:
>>>   Hello.
>>>
>>> My log/squid/netdb.state is 534MB, how can i reduce his size?
>>>
>>> On my Debian 9 can I use logrotate to rotate the file?
>> You could disable it:
>> http://www.squid-cache.org/Doc/config/netdb_filename/
> http://etutorials.org/Server+Administration/Squid.+The+definitive+guide/Chapter+10.+Talking+to+Other+Squids/10.5+The+Network+Measurement+Database/
> talks about "When the number of stored subnets reaches netdb_high,
> Squid deletes the least recently used entries until the count is less
> than netdb_low."
>
> The question being: do you actually need this?
>
--

______________________________________________

Antonino Sanacori
Servizi ICT
Università degli Studi di Brescia
Piazza del Mercato, 15 - 25121 Brescia
tel: 030 2988.325
email: [hidden email]


--


Informativa sulla Privacy: http://www.unibs.it/node/8155 
<http://www.unibs.it/node/8155>
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: [ext] Netdb. state too big

Ralf Hildebrandt
* Antonino Sanacori <[hidden email]>:
> Hello Ralf.
>
> I have not the typical record format visible in link
> http://etutorials.org... but many record as this:
>
> x.y.z.a 8.0000 23.0000 1523875740 1523876930 ip server address
>
> no subnet.

Yes, but do you need that at all?

http://www.squid-cache.org/mail-archive/squid-users/200007/0384.html
seems to imply that it's only useful in a parent-child setup (or cache
hierarchy).

--
Ralf Hildebrandt                   Charite Universitätsmedizin Berlin
[hidden email]        Campus Benjamin Franklin
https://www.charite.de             Hindenburgdamm 30, 12203 Berlin
Geschäftsbereich IT, Abt. Netzwerk fon: +49-30-450.570.155
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: [ext] Netdb. state too big

Amos Jeffries
Administrator
On 9/01/19 11:38 pm, Ralf Hildebrandt wrote:

> * Antonino Sanacori:
>> Hello Ralf.
>>
>> I have not the typical record format visible in link
>> http://etutorials.org... but many record as this:
>>
>> x.y.z.a 8.0000 23.0000 1523875740 1523876930 ip server address
>>
>> no subnet.
>
> Yes, but do you need that at all?
>
> http://www.squid-cache.org/mail-archive/squid-users/200007/0384.html
> seems to imply that it's only useful in a parent-child setup (or cache
> hierarchy).
>

It is most useful for peer connections where the peer selection
algorithm directly depends on the RTT times.

It is also used with persistent connection selection as a small
optimization to prioritize faster connections to be selected for re-use
rather than slower connections. This makes a big difference for servers
operating behind an IP load balancer.


This feature is always an optional one. In absence of NetDB RTT data
algorithms using it assume that all TCP connections are equally fast.

Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: [ext] Netdb. state too big

Ralf Hildebrandt
> It is most useful for peer connections where the peer selection
> algorithm directly depends on the RTT times.

Like reverse proxies?
 
> It is also used with persistent connection selection as a small
> optimization to prioritize faster connections to be selected for re-use
> rather than slower connections. This makes a big difference for servers
> operating behind an IP load balancer.
>
> This feature is always an optional one. In absence of NetDB RTT data
> algorithms using it assume that all TCP connections are equally fast.

In a "normal" proxy setup (users are behind 4 proxies which connect
them to the Internet), does use of Netdb make sense?

--
Ralf Hildebrandt                   Charite Universitätsmedizin Berlin
[hidden email]        Campus Benjamin Franklin
https://www.charite.de             Hindenburgdamm 30, 12203 Berlin
Geschäftsbereich IT, Abt. Netzwerk fon: +49-30-450.570.155
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: Netdb. state too big

Amos Jeffries
Administrator
In reply to this post by Antonino Sanacori
On 9/01/19 10:34 pm, Antonino Sanacori wrote:
>  Hello.
>
> My log/squid/netdb.state is 534MB, how can i reduce his size?
>

* You can safely delete Squid netdb.state journals at any time.

* You can disable NetDB by configuring "netdb_filename none" in squid.conf

However, that said ...

> On my Debian 9 can I use logrotate to rotate the file?
>

... the Debian squid packages NetDB journal file is located at
/var/spool/squid/netdb.state unless you have configured netdb_filename
to place it elsewhere.


You should *not* treat netdb.state as a log. Performing log rotation,
backups, or even using its contents for analysis is pointless. Squid
will delete and rebuild it as an hourly snapshot during regular operation.


Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: [ext] Netdb. state too big

Amos Jeffries
Administrator
In reply to this post by Ralf Hildebrandt
On 10/01/19 1:54 am, Ralf Hildebrandt wrote:
>> It is most useful for peer connections where the peer selection
>> algorithm directly depends on the RTT times.
>
> Like reverse proxies?
>  

Like weighted round-robin, ICP, HTCP.


>> It is also used with persistent connection selection as a small
>> optimization to prioritize faster connections to be selected for re-use
>> rather than slower connections. This makes a big difference for servers
>> operating behind an IP load balancer.
>>
>> This feature is always an optional one. In absence of NetDB RTT data
>> algorithms using it assume that all TCP connections are equally fast.
>
> In a "normal" proxy setup (users are behind 4 proxies which connect
> them to the Internet), does use of Netdb make sense?
>

Depends on how focused one is on latency and what RTT differences the
proxy is detecting. If you don't care about a few ms on some connections
or the RTT variation between connections to a server is normally under
1ms then it can be better to use the memory and CPU cycles for other
things like cache_mem.


Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: [ext] Netdb. state too big

Antonino Sanacori
Many thanks Amos and Ralf,

i have a simple proxy with no proxy hierarchy, then i will set the
parameter to "none".

Antonino

Il 09/01/2019 14:35, Amos Jeffries ha scritto:

> On 10/01/19 1:54 am, Ralf Hildebrandt wrote:
>>> It is most useful for peer connections where the peer selection
>>> algorithm directly depends on the RTT times.
>> Like reverse proxies?
>>  
> Like weighted round-robin, ICP, HTCP.
>
>
>>> It is also used with persistent connection selection as a small
>>> optimization to prioritize faster connections to be selected for re-use
>>> rather than slower connections. This makes a big difference for servers
>>> operating behind an IP load balancer.
>>>
>>> This feature is always an optional one. In absence of NetDB RTT data
>>> algorithms using it assume that all TCP connections are equally fast.
>> In a "normal" proxy setup (users are behind 4 proxies which connect
>> them to the Internet), does use of Netdb make sense?
>>
> Depends on how focused one is on latency and what RTT differences the
> proxy is detecting. If you don't care about a few ms on some connections
> or the RTT variation between connections to a server is normally under
> 1ms then it can be better to use the memory and CPU cycles for other
> things like cache_mem.
>
>
> Amos
> _______________________________________________
> squid-users mailing list
> [hidden email]
> http://lists.squid-cache.org/listinfo/squid-users




--


Informativa sulla Privacy: http://www.unibs.it/node/8155 
<http://www.unibs.it/node/8155>
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users