Discussion:
How to disable caching in Traffic server-7.0.0
Velusamy, Gandhimathi
2017-04-02 08:53:01 UTC
Permalink
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
Bryan Call
2017-04-04 19:05:09 UTC
Permalink
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:
[***@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
[***@homer mgmt]$ sudo /usr/local/bin/traffic_ctl config get proxy.config.http.cache.http
proxy.config.http.cache.http: 1
[***@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 ])
[***@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:
[***@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
[***@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])
[***@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
Post by 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
Velusamy, Gandhimathi
2017-04-05 06:11:45 UTC
Permalink
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


***@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:
***@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 <***@apache.org<mailto:***@apache.org>> 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:
[***@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
[***@homer mgmt]$ sudo /usr/local/bin/traffic_ctl config get proxy.config.http.cache.http
proxy.config.http.cache.http: 1
[***@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<http://homer.bryancall.com/> (ApacheTrafficServer/7.0.0 [uScRs f p eN:t cCHi p s ])
[***@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:
[***@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
[***@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<http://homer.bryancall.com/> (ApacheTrafficServer/7.0.0 [uSc sSf pSeN:tOc i p sS])
[***@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 <***@Central.UH.EDU<mailto:***@Central.UH.EDU>> 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
Bryan Call
2017-04-05 17:12:02 UTC
Permalink
If you want to look at where your memory is being used I would suggest running:

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

and

[***@homer ~]$ sudo kill -SIGUSR1 $(pidof traffic_server)
[***@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
Post by Velusamy, Gandhimathi
Hi Bryan,
Thanks for your response.
sudo bin/traffic_via 'uSc sSf pSeN:tOc i p sS'
Via header is uSc sSf pSeN:tOc i p sS, Length is 24
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
proxy.config.http.cache.http: 0
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
Post by Bryan Call
proxy.config.http.insert_response_via_str: 3
proxy.config.http.cache.http: 1
Via: http/1.1 homer.bryancall.com <http://homer.bryancall.com/> (ApacheTrafficServer/7.0.0 [uScRs f p eN:t cCHi p s ])
Via header is uScRs f p eN:t cCHi p s , Length is 24
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
set proxy.config.http.cache.http, please wait 10 seconds for traffic server to sync configuration, restart is not required
Via: http/1.1 homer.bryancall.com <http://homer.bryancall.com/> (ApacheTrafficServer/7.0.0 [uSc sSf pSeN:tOc i p sS])
Via header is uSc sSf pSeN:tOc i p sS, Length is 24
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
Post by 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
Velusamy, Gandhimathi
2017-04-06 05:02:21 UTC
Permalink
Hi Bryan,

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

Thanks
Gandhimathi

***@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: ***@pts/2
Bryan Call
2017-04-06 19:25:54 UTC
Permalink
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
Post by Velusamy, Gandhimathi
Hi Bryan,
Please, find attached the outputs of the commands you have asked me.
Thanks
Gandhimathi
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
<traffic.out>
Post by Bryan Call
ps aux --sort -rss | head
Velusamy, Gandhimathi
2017-04-06 20:15:41 UTC
Permalink
Thanks for the clarification!
-Gandhimathi
On Apr 6, 2017, at 2:25 PM, Bryan Call <***@apache.org<mailto:***@apache.org>> 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 <***@Central.UH.EDU<mailto:***@Central.UH.EDU>> wrote:

Hi Bryan,

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

Thanks
Gandhimathi

***@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: ***@pts/2

<traffic.out>
















On Apr 5, 2017, at 12:12 PM, Bryan Call <***@apache.org<mailto:***@apache.org>> wrote:

ps aux --sort -rss | head

Continue reading on narkive:
Loading...