
Tuning
Set the maximum age based on whether the content is updated (existing files are modified) on a
regular schedule. For example, if content is updated four times a day at regular intervals, you
could set the maximum age to 21600 seconds (6 hours). Otherwise, consider setting the
maximum age to the longest time you are willing to serve the previous version of a content file
after the file has been modified. If your web site’s content changes infrequently, you might want
to increase this value for improved performance.
Set the maximum age in the Admin Console in the Maximum Age field on the configuration's
Performance tab
⇒
Cache tab, under File Cache. In the command-line interface, use
wadm
set-file-cache-prop
and change the
max-age
property. The default value is 30 seconds. The
range of values is 0.001-3600.
Maximum Heap Cache Size
The optimal cache heap size depends upon how much system memory is free. A larger heap size
means that the Web Server can cache more content and therefore get a better hit ratio.
However, the heap size should not be so large that the operating system starts paging cached
files.
Tuning
Set the maximum heap size in the Admin Console in the Maximum Heap Space Size field on the
configuration's Performance tab
⇒
Cache tab, under File Cache. In the command-line
interface, use
wadm set-file-cache-prop
and change the
max-heap-space
property. The
default value is 10485760 bytes. The range of values is 0-9223372036854775807. In a 32–bit
Web Server, since processes have four GBs of address space for the file cache, the value should
be well under four GB.
Using the nocache Parameter
You can use the parameter
nocache
for the
Service
function
send-file
to specify that files in a
certain directory should not be cached. Make this change by editing
obj.conf
. For example, if
you have a set of files that changes too rapidly for caching to be useful, you can put them into a
directory and instruct the server not to cache files in that directory by editing
obj.conf
.
Example
<Object name=default>
...
NameTrans fn=
"
pfx2dir
"
from=
"
/myurl
"
dir=
"
/export/mydir
"
name=
"
myname
"
...
Service method=(GET|HEAD|POST) type=*~magnus-internal/*
fn=send-file
Using Monitoring Data to Tune Your Server
Chapter 2 • Tuning Sun Java System Web Server
63
Summary of Contents for Sun Java System Web Server 7.0
Page 9: ...Figures FIGURE 2 1 Web Server Connection Handling 40 9 ...
Page 10: ...10 ...
Page 18: ...18 ...
Page 38: ...38 ...
Page 84: ...84 ...
Page 100: ...100 ...