You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@trafficserver.apache.org by Timur Irmatov <ir...@gmail.com> on 2014/01/08 06:45:39 UTC

ATS comes up with empty cache each time it is restarted

Hi,


I am running Apache TrafficServer 4.1.2 compiled from sources on
Ubuntu 13.10 as forward proxy. We are using 4 raw disks as a cache,
around 90 GB each. Each time I stop and start trafficserver (with
trafficserver stop/ start command) it comes up with its cache emptied.
I couldn't find any relevant complaints/ errors in log files. It is
very unpleasant to lose ~200 GB of cache on normal server restart.

How can I fix that?

Also, I have other unrelated question. My primary goal for using ATS
as forward proxy is to save some internet bandwidth. There is about 20
Mbit/s of traffic from a couple hundreds of clients. But, most of time
I see ATS receiving *more* traffic from internet than it is sending
towards clients.

I have tried disabling background fill:

CONFIG proxy.config.http.background_fill_active_timeout INT 1
CONFIG proxy.config.http.background_fill_completed_threshold FLOAT 0.990000

Recently I have enabled flow control:

CONFIG proxy.config.http.flow_control.low_water INT 65536
CONFIG proxy.config.http.flow_control.high_water INT 131072
CONFIG proxy.config.http.flow_control.enabled INT 1

But, still I am seeing ATS frequently (averaged over 5 minutes)
receive more internet traffic than it sends to clients. Clients are
generally connected through ADSL and limited to various speeds from
0.5 to 2 Mbit/s.

Any hints on fixing that?

P.S. I would like to thank all ATS developers. ATS is much more stable
than Squid and has better performance in our setup.


-- 
Timur Irmatov

Re: ATS comes up with empty cache each time it is restarted

Posted by "Adam W. Dace" <co...@gmail.com>.
My mistake, sorry about that.

-- 
____________________________________________________________
Adam W. Dace <co...@gmail.com>

Phone: (815) 355-5848
Instant Messenger: AIM & Yahoo! IM - colonelforbin74 | ICQ - #39374451
Microsoft Messenger - colonelforbin74@live.com <ad...@turing.com>

Google Profile: https://plus.google.com/u/0/109309036874332290399/about

Re: ATS comes up with empty cache each time it is restarted

Posted by Leif Hedstrom <zw...@apache.org>.
On Jan 9, 2014, at 11:02 PM, Timur Irmatov <ir...@gmail.com> wrote:

> On Thu, Jan 9, 2014 at 1:27 AM, Adam W. Dace <co...@gmail.com> wrote:
>> I can't speak to the problem of ATS losing its cache somehow,
>> but as far as bandwidth usage goes you may want to try disabling this
>> setting:
>> 
>> CONFIG proxy.config.http.cache.fuzz.min_time INT 0
>> 
>> By default, ATS will try to pre-fetch frequently used objects.
>> A neat idea, but perhaps one you don't want.
> 
> I don't think those settings have such effect. If I am understanding
> documentation correctly, those settings just give a chance to
> revalidate an object that is soon to become stale when a request for
> that object comes from a client. In other words, ATS would not
> revalidate such objects by itself but only when clients request that
> object. This means requests to origin server should be no more than
> requests from clients.


Yep, that is correct. It’s a way to statistically reduce the risk of a thundering herd event. For objects that gets no, or very few, requests, it should have no affect (since it never triggers).

If the documentation for this setting needs updates, we’re thrilled to see patches / pull requests on docs! :-).

Cheers,

— Leif


Re: ATS comes up with empty cache each time it is restarted

Posted by Timur Irmatov <ir...@gmail.com>.
On Thu, Jan 9, 2014 at 1:27 AM, Adam W. Dace <co...@gmail.com> wrote:
> I can't speak to the problem of ATS losing its cache somehow,
> but as far as bandwidth usage goes you may want to try disabling this
> setting:
>
> CONFIG proxy.config.http.cache.fuzz.min_time INT 0
>
> By default, ATS will try to pre-fetch frequently used objects.
> A neat idea, but perhaps one you don't want.

I don't think those settings have such effect. If I am understanding
documentation correctly, those settings just give a chance to
revalidate an object that is soon to become stale when a request for
that object comes from a client. In other words, ATS would not
revalidate such objects by itself but only when clients request that
object. This means requests to origin server should be no more than
requests from clients.


-- 
Timur Irmatov

Re: ATS comes up with empty cache each time it is restarted

Posted by "Adam W. Dace" <co...@gmail.com>.
I can't speak to the problem of ATS losing its cache somehow,
but as far as bandwidth usage goes you may want to try disabling this
setting:

CONFIG proxy.config.http.cache.fuzz.min_time INT 0

By default, ATS will try to pre-fetch frequently used objects.
A neat idea, but perhaps one you don't want.

Regards,

Adam



On Tue, Jan 7, 2014 at 11:45 PM, Timur Irmatov <ir...@gmail.com> wrote:

> Hi,
>
>
> I am running Apache TrafficServer 4.1.2 compiled from sources on
> Ubuntu 13.10 as forward proxy. We are using 4 raw disks as a cache,
> around 90 GB each. Each time I stop and start trafficserver (with
> trafficserver stop/ start command) it comes up with its cache emptied.
> I couldn't find any relevant complaints/ errors in log files. It is
> very unpleasant to lose ~200 GB of cache on normal server restart.
>
> How can I fix that?
>
> Also, I have other unrelated question. My primary goal for using ATS
> as forward proxy is to save some internet bandwidth. There is about 20
> Mbit/s of traffic from a couple hundreds of clients. But, most of time
> I see ATS receiving *more* traffic from internet than it is sending
> towards clients.
>
> I have tried disabling background fill:
>
> CONFIG proxy.config.http.background_fill_active_timeout INT 1
> CONFIG proxy.config.http.background_fill_completed_threshold FLOAT 0.990000
>
> Recently I have enabled flow control:
>
> CONFIG proxy.config.http.flow_control.low_water INT 65536
> CONFIG proxy.config.http.flow_control.high_water INT 131072
> CONFIG proxy.config.http.flow_control.enabled INT 1
>
> But, still I am seeing ATS frequently (averaged over 5 minutes)
> receive more internet traffic than it sends to clients. Clients are
> generally connected through ADSL and limited to various speeds from
> 0.5 to 2 Mbit/s.
>
> Any hints on fixing that?
>
> P.S. I would like to thank all ATS developers. ATS is much more stable
> than Squid and has better performance in our setup.
>
>
> --
> Timur Irmatov
>



-- 
____________________________________________________________
Adam W. Dace <co...@gmail.com>

Phone: (815) 355-5848
Instant Messenger: AIM & Yahoo! IM - colonelforbin74 | ICQ - #39374451
Microsoft Messenger - colonelforbin74@live.com <ad...@turing.com>

Google Profile: https://plus.google.com/u/0/109309036874332290399/about

Re: ATS comes up with empty cache each time it is restarted

Posted by Timur Irmatov <ir...@gmail.com>.
On Wed, Jan 8, 2014 at 9:19 PM, James Peach <jp...@apache.org> wrote:
> On Jan 8, 2014, at 1:26 AM, Scott Harris <sc...@harrisnet.id.au> wrote:
>> When you compiled did you enable Linux native aio? If so check out issue TS-2138.
>
> Timur, I'm curious why you enabled native AIO? Was the behaviour better than the default?

Well, I just thought it was a good idea.. :)

-- 
Timur Irmatov

Re: ATS comes up with empty cache each time it is restarted

Posted by James Peach <jp...@apache.org>.
On Jan 8, 2014, at 1:26 AM, Scott Harris <sc...@harrisnet.id.au> wrote:

> Timur,
> 
> When you compiled did you enable Linux native aio? If so check out issue TS-2138.

Timur, I'm curious why you enabled native AIO? Was the behaviour better than the default?

> 
> Scott
> 
> On 08/01/2014 4:46 PM, "Timur Irmatov" <ir...@gmail.com> wrote:
> Hi,
> 
> 
> I am running Apache TrafficServer 4.1.2 compiled from sources on
> Ubuntu 13.10 as forward proxy. We are using 4 raw disks as a cache,
> around 90 GB each. Each time I stop and start trafficserver (with
> trafficserver stop/ start command) it comes up with its cache emptied.
> I couldn't find any relevant complaints/ errors in log files. It is
> very unpleasant to lose ~200 GB of cache on normal server restart.
> 
> How can I fix that?
> 
> Also, I have other unrelated question. My primary goal for using ATS
> as forward proxy is to save some internet bandwidth. There is about 20
> Mbit/s of traffic from a couple hundreds of clients. But, most of time
> I see ATS receiving *more* traffic from internet than it is sending
> towards clients.
> 
> I have tried disabling background fill:
> 
> CONFIG proxy.config.http.background_fill_active_timeout INT 1
> CONFIG proxy.config.http.background_fill_completed_threshold FLOAT 0.990000
> 
> Recently I have enabled flow control:
> 
> CONFIG proxy.config.http.flow_control.low_water INT 65536
> CONFIG proxy.config.http.flow_control.high_water INT 131072
> CONFIG proxy.config.http.flow_control.enabled INT 1
> 
> But, still I am seeing ATS frequently (averaged over 5 minutes)
> receive more internet traffic than it sends to clients. Clients are
> generally connected through ADSL and limited to various speeds from
> 0.5 to 2 Mbit/s.
> 
> Any hints on fixing that?
> 
> P.S. I would like to thank all ATS developers. ATS is much more stable
> than Squid and has better performance in our setup.
> 
> 
> --
> Timur Irmatov


Re: ATS comes up with empty cache each time it is restarted

Posted by Timur Irmatov <ir...@gmail.com>.
On Wed, Jan 8, 2014 at 2:26 PM, Scott Harris <sc...@harrisnet.id.au> wrote:
> Timur,
>
> When you compiled did you enable Linux native aio? If so check out issue
> TS-2138.

Yes, I have enabled Linux native aio. Disabling it fixes the problem,
indeed. Thanks!

-- 
Timur Irmatov

Re: ATS comes up with empty cache each time it is restarted

Posted by Scott Harris <sc...@harrisnet.id.au>.
Timur,

When you compiled did you enable Linux native aio? If so check out issue
TS-2138.

Scott
On 08/01/2014 4:46 PM, "Timur Irmatov" <ir...@gmail.com> wrote:

> Hi,
>
>
> I am running Apache TrafficServer 4.1.2 compiled from sources on
> Ubuntu 13.10 as forward proxy. We are using 4 raw disks as a cache,
> around 90 GB each. Each time I stop and start trafficserver (with
> trafficserver stop/ start command) it comes up with its cache emptied.
> I couldn't find any relevant complaints/ errors in log files. It is
> very unpleasant to lose ~200 GB of cache on normal server restart.
>
> How can I fix that?
>
> Also, I have other unrelated question. My primary goal for using ATS
> as forward proxy is to save some internet bandwidth. There is about 20
> Mbit/s of traffic from a couple hundreds of clients. But, most of time
> I see ATS receiving *more* traffic from internet than it is sending
> towards clients.
>
> I have tried disabling background fill:
>
> CONFIG proxy.config.http.background_fill_active_timeout INT 1
> CONFIG proxy.config.http.background_fill_completed_threshold FLOAT 0.990000
>
> Recently I have enabled flow control:
>
> CONFIG proxy.config.http.flow_control.low_water INT 65536
> CONFIG proxy.config.http.flow_control.high_water INT 131072
> CONFIG proxy.config.http.flow_control.enabled INT 1
>
> But, still I am seeing ATS frequently (averaged over 5 minutes)
> receive more internet traffic than it sends to clients. Clients are
> generally connected through ADSL and limited to various speeds from
> 0.5 to 2 Mbit/s.
>
> Any hints on fixing that?
>
> P.S. I would like to thank all ATS developers. ATS is much more stable
> than Squid and has better performance in our setup.
>
>
> --
> Timur Irmatov
>