How to disable caching in Traffic server-7.0.0

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

How to disable caching in Traffic server-7.0.0

Velusamy, Gandhimathi
Hi,
I am working on load balancing plugin and developed some dynamic policies. To evaluate them, I tried to disable caching. But it did not stop caching.

proxy.config.http.cache.http of records.config was set to 0.

sudo bin/traffic_ctl config get proxy.config.http.cache.http
proxy.config.http.cache.http: 0

I even commented the path to cache in Storage.config file.

Previously I was working with Traffic server 6.2 and I was able disable caching.

May I please know how to disable caching in Traffic server-7.0.0.


Thanks
Gandhimathi



Reply | Threaded
Open this post in threaded view
|

Re: How to disable caching in Traffic server-7.0.0

Bryan Call-2
ATS should not cache If proxy.config.http.cache.http is set to 0.  Here is a test with the 7.0.0 branch:


Cache Enabled:
[bcall@homer mgmt]$ sudo /usr/local/bin/traffic_ctl config get proxy.config.http.insert_response_via_str
proxy.config.http.insert_response_via_str: 3
[bcall@homer mgmt]$ sudo /usr/local/bin/traffic_ctl config get proxy.config.http.cache.http
proxy.config.http.cache.http: 1
[bcall@homer mgmt]$ curl -D - -o /dev/null -s http://127.0.0.1:8080/200_cache.php | grep Via
Via: http/1.1 homer.bryancall.com (ApacheTrafficServer/7.0.0 [uScRs f p eN:t cCHi p s ])
[bcall@homer mgmt]$ /usr/local/bin/traffic_via 'uScRs f p eN:t cCHi p s '
Via header is uScRs f p eN:t cCHi p s , Length is 24
Via Header Details:
Request headers received from client                   :simple request (not conditional)
Result of Traffic Server cache lookup for URL          :in cache, fresh Ram hit (a cache "HIT")
Response information received from origin server       :no server connection needed
Result of document write-to-cache:                     :no cache write performed
Proxy operation result                                 :unknown
Error codes (if any)                                   :no error
Tunnel info                                            :no tunneling
Cache Type                                             :cache
Cache Lookup Result                                    :cache hit
ICP status                                             :no icp
Parent proxy connection status                         :no parent proxy or unknown
Origin server connection status                        :no server connection needed

Cache Disabled:
[bcall@homer mgmt]$ sudo /usr/local/bin/traffic_ctl config set proxy.config.http.cache.http 0
set proxy.config.http.cache.http, please wait 10 seconds for traffic server to sync configuration, restart is not required
[bcall@homer mgmt]$ curl -D - -o /dev/null -s http://127.0.0.1:8080/200_cache.php | grep Via
Via: http/1.1 homer.bryancall.com (ApacheTrafficServer/7.0.0 [uSc sSf pSeN:tOc  i p sS])
[bcall@homer mgmt]$ /usr/local/bin/traffic_via 'uSc sSf pSeN:tOc  i p sS'
Via header is uSc sSf pSeN:tOc  i p sS, Length is 24
Via Header Details:
Request headers received from client                   :simple request (not conditional)
Result of Traffic Server cache lookup for URL          :no cache lookup
Response information received from origin server       :connection opened successfully
Result of document write-to-cache:                     :no cache write performed
Proxy operation result                                 :served or connection opened successfully
Error codes (if any)                                   :no error
Tunnel info                                            :tunneling because cache is turned off
Cache Type                                             :unknown
Cache Lookup Result                                    :cache miss or no cache lookup
ICP status                                             :no icp
Parent proxy connection status                         :no parent proxy or unknown
Origin server connection status                        :connection opened successfully


-Bryan

On Apr 2, 2017, at 1:53 AM, Velusamy, Gandhimathi <[hidden email]> wrote:

Hi,
I am working on load balancing plugin and developed some dynamic policies. To evaluate them, I tried to disable caching. But it did not stop caching.

proxy.config.http.cache.http of records.config was set to 0.

sudo bin/traffic_ctl config get proxy.config.http.cache.http
proxy.config.http.cache.http: 0

I even commented the path to cache in Storage.config file.

Previously I was working with Traffic server 6.2 and I was able disable caching.

May I please know how to disable caching in Traffic server-7.0.0.


Thanks
Gandhimathi




Reply | Threaded
Open this post in threaded view
|

Re: How to disable caching in Traffic server-7.0.0

Velusamy, Gandhimathi
Hi Bryan,

   Thanks for your response.

Yes. I checked as per your suggestion and got output as:

sudo bin/traffic_via 'uSc sSf pSeN:tOc  i p sS'
Via header is uSc sSf pSeN:tOc  i p sS, Length is 24
Via Header Details:
Request headers received from client                   :simple request (not conditional)
Result of Traffic Server cache lookup for URL          :no cache lookup
Response information received from origin server       :connection opened successfully
Result of document write-to-cache:                     :no cache write performed
Proxy operation result                                 :served or connection opened successfully
Error codes (if any)                                   :no error
Tunnel info                                            :tunneling because cache is turned off
Cache Type                                             :unknown
Cache Lookup Result                                    :cache miss or no cache lookup
ICP status                                             :no icp
Parent proxy connection status                         :no parent proxy or unknown
Origin server connection status                        :connection opened successfully


gvelusam@p206:/usr/local$ sudo bin/traffic_ctl config get proxy.config.http.cache.http
[sudo] password for gvelusam: 
proxy.config.http.cache.http: 0

But when I check with free command, it shows as below:
gvelusam@p206:/usr/local$ free -m
             total       used       free     shared    buffers     cached
Mem:         15894      15712        181          0         29      11965
-/+ buffers/cache:       3716      12177
Swap:      2861487         42    2861445

Is this normal?

Thanks
Gandhimathi


On Apr 4, 2017, at 2:05 PM, Bryan Call <[hidden email]> wrote:

ATS should not cache If proxy.config.http.cache.http is set to 0.  Here is a test with the 7.0.0 branch:


Cache Enabled:
[bcall@homer mgmt]$ sudo /usr/local/bin/traffic_ctl config get proxy.config.http.insert_response_via_str
proxy.config.http.insert_response_via_str: 3
[bcall@homer mgmt]$ sudo /usr/local/bin/traffic_ctl config get proxy.config.http.cache.http
proxy.config.http.cache.http: 1
[bcall@homer mgmt]$ curl -D - -o /dev/null -s http://127.0.0.1:8080/200_cache.php | grep Via
Via: http/1.1 homer.bryancall.com (ApacheTrafficServer/7.0.0 [uScRs f p eN:t cCHi p s ])
[bcall@homer mgmt]$ /usr/local/bin/traffic_via 'uScRs f p eN:t cCHi p s '
Via header is uScRs f p eN:t cCHi p s , Length is 24
Via Header Details:
Request headers received from client                   :simple request (not conditional)
Result of Traffic Server cache lookup for URL          :in cache, fresh Ram hit (a cache "HIT")
Response information received from origin server       :no server connection needed
Result of document write-to-cache:                     :no cache write performed
Proxy operation result                                 :unknown
Error codes (if any)                                   :no error
Tunnel info                                            :no tunneling
Cache Type                                             :cache
Cache Lookup Result                                    :cache hit
ICP status                                             :no icp
Parent proxy connection status                         :no parent proxy or unknown
Origin server connection status                        :no server connection needed

Cache Disabled:
[bcall@homer mgmt]$ sudo /usr/local/bin/traffic_ctl config set proxy.config.http.cache.http 0
set proxy.config.http.cache.http, please wait 10 seconds for traffic server to sync configuration, restart is not required
[bcall@homer mgmt]$ curl -D - -o /dev/null -s http://127.0.0.1:8080/200_cache.php | grep Via
Via: http/1.1 homer.bryancall.com (ApacheTrafficServer/7.0.0 [uSc sSf pSeN:tOc  i p sS])
[bcall@homer mgmt]$ /usr/local/bin/traffic_via 'uSc sSf pSeN:tOc  i p sS'
Via header is uSc sSf pSeN:tOc  i p sS, Length is 24
Via Header Details:
Request headers received from client                   :simple request (not conditional)
Result of Traffic Server cache lookup for URL          :no cache lookup
Response information received from origin server       :connection opened successfully
Result of document write-to-cache:                     :no cache write performed
Proxy operation result                                 :served or connection opened successfully
Error codes (if any)                                   :no error
Tunnel info                                            :tunneling because cache is turned off
Cache Type                                             :unknown
Cache Lookup Result                                    :cache miss or no cache lookup
ICP status                                             :no icp
Parent proxy connection status                         :no parent proxy or unknown
Origin server connection status                        :connection opened successfully


-Bryan

On Apr 2, 2017, at 1:53 AM, Velusamy, Gandhimathi <[hidden email]> wrote:

Hi,
I am working on load balancing plugin and developed some dynamic policies. To evaluate them, I tried to disable caching. But it did not stop caching.

proxy.config.http.cache.http of records.config was set to 0.

sudo bin/traffic_ctl config get proxy.config.http.cache.http
proxy.config.http.cache.http: 0

I even commented the path to cache in Storage.config file.

Previously I was working with Traffic server 6.2 and I was able disable caching.

May I please know how to disable caching in Traffic server-7.0.0.


Thanks
Gandhimathi





Reply | Threaded
Open this post in threaded view
|

Re: How to disable caching in Traffic server-7.0.0

Bryan Call-2
If you want to look at where your memory is being used I would suggest running:

[bcall@homer ~]$ ps aux --sort -rss | head

and

[bcall@homer ~]$ sudo kill -SIGUSR1 $(pidof traffic_server)
[bcall@homer ~]$ tail -100 /usr/local/var/log/trafficserver/traffic.out

If you can paste the output of those commands it would help diagnose the issue.

And


On Apr 4, 2017, at 11:11 PM, Velusamy, Gandhimathi <[hidden email]> wrote:

Hi Bryan,

   Thanks for your response.

Yes. I checked as per your suggestion and got output as:

sudo bin/traffic_via 'uSc sSf pSeN:tOc  i p sS'
Via header is uSc sSf pSeN:tOc  i p sS, Length is 24
Via Header Details:
Request headers received from client                   :simple request (not conditional)
Result of Traffic Server cache lookup for URL          :no cache lookup
Response information received from origin server       :connection opened successfully
Result of document write-to-cache:                     :no cache write performed
Proxy operation result                                 :served or connection opened successfully
Error codes (if any)                                   :no error
Tunnel info                                            :tunneling because cache is turned off
Cache Type                                             :unknown
Cache Lookup Result                                    :cache miss or no cache lookup
ICP status                                             :no icp
Parent proxy connection status                         :no parent proxy or unknown
Origin server connection status                        :connection opened successfully


gvelusam@p206:/usr/local$ sudo bin/traffic_ctl config get proxy.config.http.cache.http
[sudo] password for gvelusam: 
proxy.config.http.cache.http: 0

But when I check with free command, it shows as below:
gvelusam@p206:/usr/local$ free -m
             total       used       free     shared    buffers     cached
Mem:         15894      15712        181          0         29      11965
-/+ buffers/cache:       3716      12177
Swap:      2861487         42    2861445

Is this normal?

Thanks
Gandhimathi


On Apr 4, 2017, at 2:05 PM, Bryan Call <[hidden email]> wrote:

ATS should not cache If proxy.config.http.cache.http is set to 0.  Here is a test with the 7.0.0 branch:


Cache Enabled:
[bcall@homer mgmt]$ sudo /usr/local/bin/traffic_ctl config get proxy.config.http.insert_response_via_str
proxy.config.http.insert_response_via_str: 3
[bcall@homer mgmt]$ sudo /usr/local/bin/traffic_ctl config get proxy.config.http.cache.http
proxy.config.http.cache.http: 1
[bcall@homer mgmt]$ curl -D - -o /dev/null -s http://127.0.0.1:8080/200_cache.php | grep Via
Via: http/1.1 homer.bryancall.com (ApacheTrafficServer/7.0.0 [uScRs f p eN:t cCHi p s ])
[bcall@homer mgmt]$ /usr/local/bin/traffic_via 'uScRs f p eN:t cCHi p s '
Via header is uScRs f p eN:t cCHi p s , Length is 24
Via Header Details:
Request headers received from client                   :simple request (not conditional)
Result of Traffic Server cache lookup for URL          :in cache, fresh Ram hit (a cache "HIT")
Response information received from origin server       :no server connection needed
Result of document write-to-cache:                     :no cache write performed
Proxy operation result                                 :unknown
Error codes (if any)                                   :no error
Tunnel info                                            :no tunneling
Cache Type                                             :cache
Cache Lookup Result                                    :cache hit
ICP status                                             :no icp
Parent proxy connection status                         :no parent proxy or unknown
Origin server connection status                        :no server connection needed

Cache Disabled:
[bcall@homer mgmt]$ sudo /usr/local/bin/traffic_ctl config set proxy.config.http.cache.http 0
set proxy.config.http.cache.http, please wait 10 seconds for traffic server to sync configuration, restart is not required
[bcall@homer mgmt]$ curl -D - -o /dev/null -s http://127.0.0.1:8080/200_cache.php | grep Via
Via: http/1.1 homer.bryancall.com (ApacheTrafficServer/7.0.0 [uSc sSf pSeN:tOc  i p sS])
[bcall@homer mgmt]$ /usr/local/bin/traffic_via 'uSc sSf pSeN:tOc  i p sS'
Via header is uSc sSf pSeN:tOc  i p sS, Length is 24
Via Header Details:
Request headers received from client                   :simple request (not conditional)
Result of Traffic Server cache lookup for URL          :no cache lookup
Response information received from origin server       :connection opened successfully
Result of document write-to-cache:                     :no cache write performed
Proxy operation result                                 :served or connection opened successfully
Error codes (if any)                                   :no error
Tunnel info                                            :tunneling because cache is turned off
Cache Type                                             :unknown
Cache Lookup Result                                    :cache miss or no cache lookup
ICP status                                             :no icp
Parent proxy connection status                         :no parent proxy or unknown
Origin server connection status                        :connection opened successfully


-Bryan

On Apr 2, 2017, at 1:53 AM, Velusamy, Gandhimathi <[hidden email]> wrote:

Hi,
I am working on load balancing plugin and developed some dynamic policies. To evaluate them, I tried to disable caching. But it did not stop caching.

proxy.config.http.cache.http of records.config was set to 0.

sudo bin/traffic_ctl config get proxy.config.http.cache.http
proxy.config.http.cache.http: 0

I even commented the path to cache in Storage.config file.

Previously I was working with Traffic server 6.2 and I was able disable caching.

May I please know how to disable caching in Traffic server-7.0.0.


Thanks
Gandhimathi






Reply | Threaded
Open this post in threaded view
|

Re: How to disable caching in Traffic server-7.0.0

Velusamy, Gandhimathi
Hi Bryan,

Please, find attached the outputs of the commands you have asked me.

Thanks
Gandhimathi

gvelusamy@p206:/usr/local$ ps aux --sort -rss | head

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
rl     1681 14.6 13.1 3387540 2134776 ?     Sl   Feb11 11297:41 /usr/lib/virtualbox/VBoxHeadless --comment px206 --startvm 1778fe5a-464e-440d-9242-b4ee91b25361 --vrde config
nobody    8061 21.5  0.3 1227460 58684 ?       Sl   23:48   0:17 /usr/local/bin/traffic_server -M --bind_stdout /usr/local/var/log/trafficserver/traffic.out --bind_stderr /usr/local/var/log/trafficserver/traffic.out --httpport 80:fd=9
nobody    8053  0.1  0.0 422880  6452 ?        Sl   23:48   0:00 /usr/local/bin/traffic_manager --bind_stdout /usr/local/var/log/trafficserver/traffic.out --bind_stderr /usr/local/var/log/trafficserver/traffic.out
gvelusamy  7647  0.0  0.0  21916  4512 pts/2    Ss   23:16   0:00 -bash
root      7595  0.0  0.0 105632  4236 ?        Ss   23:16   0:00 sshd: gvelusamy [priv]
rl     1659  0.0  0.0 543420  3092 ?        Sl   Feb11  45:46 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
root      8051  0.0  0.0 118132  3072 ?        Ssl  23:48   0:00 /usr/local/bin/traffic_cop
gvelusamy  8094  0.0  0.0  21916  2816 pts/2    D+   23:49   0:00 -bash
gvelusamy  7646  0.0  0.0 105632  1904 ?        S    23:16   0:00 sshd: gvelusamy@pts/2


traffic.out (22K) Download Attachment
ATT00001.htm (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: How to disable caching in Traffic server-7.0.0

Bryan Call-2
For some reason the sigusr1 memory dump didn’t show up in traffic.out, but I don’t think it is needed.

ATS is using 2.1GB of memory on your server.  Most of the memory (11GB) is being used by the OS to cache the file system.  Linux will use the available RAM to cache the filesystem to make disk access faster.  It will be freed if you need the RAM for applications.

I don’t think there is a memory issue on your server and looks to be healthy.

-Bryan

On Apr 5, 2017, at 10:02 PM, Velusamy, Gandhimathi <[hidden email]> wrote:

Hi Bryan,

Please, find attached the outputs of the commands you have asked me.

Thanks
Gandhimathi

gvelusamy@p206:/usr/local$ ps aux --sort -rss | head

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
rl     1681 14.6 13.1 3387540 2134776 ?     Sl   Feb11 11297:41 /usr/lib/virtualbox/VBoxHeadless --comment px206 --startvm 1778fe5a-464e-440d-9242-b4ee91b25361 --vrde config
nobody    8061 21.5  0.3 1227460 58684 ?       Sl   23:48   0:17 /usr/local/bin/traffic_server -M --bind_stdout /usr/local/var/log/trafficserver/traffic.out --bind_stderr /usr/local/var/log/trafficserver/traffic.out --httpport 80:fd=9
nobody    8053  0.1  0.0 422880  6452 ?        Sl   23:48   0:00 /usr/local/bin/traffic_manager --bind_stdout /usr/local/var/log/trafficserver/traffic.out --bind_stderr /usr/local/var/log/trafficserver/traffic.out
gvelusamy  7647  0.0  0.0  21916  4512 pts/2    Ss   23:16   0:00 -bash
root      7595  0.0  0.0 105632  4236 ?        Ss   23:16   0:00 sshd: gvelusamy [priv]
rl     1659  0.0  0.0 543420  3092 ?        Sl   Feb11  45:46 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
root      8051  0.0  0.0 118132  3072 ?        Ssl  23:48   0:00 /usr/local/bin/traffic_cop
gvelusamy  8094  0.0  0.0  21916  2816 pts/2    D+   23:49   0:00 -bash
gvelusamy  7646  0.0  0.0 105632  1904 ?        S    23:16   0:00 sshd: gvelusamy@pts/2

<traffic.out>
















On Apr 5, 2017, at 12:12 PM, Bryan Call <[hidden email]> wrote:

ps aux --sort -rss | head


Reply | Threaded
Open this post in threaded view
|

Re: How to disable caching in Traffic server-7.0.0

Velusamy, Gandhimathi
Thanks for the clarification!
-Gandhimathi
On Apr 6, 2017, at 2:25 PM, Bryan Call <[hidden email]> wrote:

For some reason the sigusr1 memory dump didn’t show up in traffic.out, but I don’t think it is needed.

ATS is using 2.1GB of memory on your server.  Most of the memory (11GB) is being used by the OS to cache the file system.  Linux will use the available RAM to cache the filesystem to make disk access faster.  It will be freed if you need the RAM for applications.

I don’t think there is a memory issue on your server and looks to be healthy.

-Bryan

On Apr 5, 2017, at 10:02 PM, Velusamy, Gandhimathi <[hidden email]> wrote:

Hi Bryan,

Please, find attached the outputs of the commands you have asked me.

Thanks
Gandhimathi

gvelusamy@p206:/usr/local$ ps aux --sort -rss | head

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
rl     1681 14.6 13.1 3387540 2134776 ?     Sl   Feb11 11297:41 /usr/lib/virtualbox/VBoxHeadless --comment px206 --startvm 1778fe5a-464e-440d-9242-b4ee91b25361 --vrde config
nobody    8061 21.5  0.3 1227460 58684 ?       Sl   23:48   0:17 /usr/local/bin/traffic_server -M --bind_stdout /usr/local/var/log/trafficserver/traffic.out --bind_stderr /usr/local/var/log/trafficserver/traffic.out --httpport 80:fd=9
nobody    8053  0.1  0.0 422880  6452 ?        Sl   23:48   0:00 /usr/local/bin/traffic_manager --bind_stdout /usr/local/var/log/trafficserver/traffic.out --bind_stderr /usr/local/var/log/trafficserver/traffic.out
gvelusamy  7647  0.0  0.0  21916  4512 pts/2    Ss   23:16   0:00 -bash
root      7595  0.0  0.0 105632  4236 ?        Ss   23:16   0:00 sshd: gvelusamy [priv]
rl     1659  0.0  0.0 543420  3092 ?        Sl   Feb11  45:46 /usr/lib/virtualbox/VBoxSVC --auto-shutdown
root      8051  0.0  0.0 118132  3072 ?        Ssl  23:48   0:00 /usr/local/bin/traffic_cop
gvelusamy  8094  0.0  0.0  21916  2816 pts/2    D+   23:49   0:00 -bash
gvelusamy  7646  0.0  0.0 105632  1904 ?        S    23:16   0:00 sshd: gvelusamy@pts/2

<traffic.out>
















On Apr 5, 2017, at 12:12 PM, Bryan Call <[hidden email]> wrote:

ps aux --sort -rss | head