Sun Microsystems 7 Security Camera User Manual


 
Tuning
Set the maximum age based on whether the content is updated (existing les are modied) 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 le
after the le has been modied. 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 eld on the conguration'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
les.
Tuning
Set the maximum heap size in the Admin Console in the Maximum Heap Space Size eld on the
conguration'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 le 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 les in a
certain directory should not be cached. Make this change by editing obj.conf. For example, if
you have a set of les that changes too rapidly for caching to be useful, you can put them into a
directory and instruct the server not to cache les 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
UsingMonitoringDatatoTuneYour Server
Chapter2 • TuningSunJavaSystemWebServer 63