Max Files Count
Max Files Count determines how many les are in the cache. If the value is too big, the server
caches little-needed les, which wastes memory. If the value is too small, the benet of caching
is lost. Try dierent values of this attribute to nd the optimal solution for specic
applications—generally, the eects will not be great.
Hash Init Size
Hash Init Size aects memory use and search time, but rarely will have a measurable eect on
performance.
Max Age
This parameter controls how long cached information is used after a le has been cached. An
entry older than the maximum age is replaced by a new entry for the same le.
If your web site’s content changes infrequently, increase this value for improved performance.
Set the maximum age by entering or changing the value in the Maximum Age eld of the File
Cache Conguration page in the web-based Admin Console for the HTTP server node and
selecting the File Caching Tab.
Set the maximum age based on whether the content is updated (existing les are modied) on a
regular schedule or not. 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 modied.
Small/Medium File Size and File Size Limit
The cache treats small, medium, and large les dierently. The contents of medium les are
cached by mapping the le into virtual memory (Unix/Linux platforms). The contents of small
les are cached by allocating heap space and reading the le into it. The contents of large les
are not cached, although information about large les is cached.
The advantage of distinguishing between small les and medium les is to avoid wasting part of
many pages of virtual memory when there are lots of small les. So the Small File Size Limit is
typically a slightly lower value than the VM page size.
FileTransmission
When File Transmission is enabled, the server caches open le descriptors for les in the le
cache, rather than the le contents. Also, the distinction normally made between small,
medium, and large les no longer applies since only the open le descriptor is being cached.
By default, File Transmission is enabled on Windows, and disabled on UNIX. On UNIX, only
enable File Transmission for platforms that have the requisite native OS support: HP-UX and
AIX. Don’t enable it for other UNIX/Linux platforms.
HTTP ServiceSettings
SunGlassFishEnterpriseServer2.1PerformanceTuningGuide • January200968