Chapter 4 System Configuration
© 2017 Harmonic Inc. All rights reserved.
153
Harmonic MediaGrid Release 4.1
Managing Memory Usage by the File System Driver
Open File Limit
. This parameter controls the maximum number of simultaneously open files
the Linux FSD supports. The default value is 1024. Increase this value as necessary to
support an application’s requirements. Note that increasing this value can increase the
amount of memory used by the Linux FSD. Increasing it too much may prevent an application
from running due to memory starvation.
Pre-allocation Limit
.
This parameter tells the Linux FSD to allocate all the buffer memory it
will use at module load time. The default value is 1024 cache memory units (equivalent to
256MB). The allocation is done over a short period of time following startup. During
operation, the FSD will not need to request any additional large allocations. This prevents
sudden demands for memory, which occasionally cause the Linux kernel to panic. The
gradual increase in memory usage at startup is expected and normal.
The Harmonic MediaGrid server cannot be mounted until the pre-allocations are completed.
If a mount command is issued immediately after loading the omfs module, the command may
fail with an error message indicating, “Some resources could not be allocated, try again later.”
Reissue the mount command later. This message indicates that the omfs module has not
completed allocation of memory after loading.
Reducing the pre-allocation value after memory has been allocated has no effect, as the
Linux FSD will not release any memory it has acquired. Since the Linux FSD begins allocating
memory as soon as the omfs module is loaded by the Linux kernel, trying to limit the amount
of memory allocated to a value below 256MB using this method produces inconsistent
results.
Allocation Limit
. On occasion, the FSD may need more cache memory than that which is
specified in the Cache Memory Limit. For these instances, the Allocation Limit parameter is
available. The default value, 5764 cache memory units (slightly more than 1 GB), is usually
enough to accommodate these short-term needs.
Setting Memory Usage Parameters on Macintosh Clients
IMPORTANT:
The default value for the Cache Memory Limit is sufficient in most cases. If you are unsure
of whether you should change it, please contact Technical Support for assistance.
1. Set the ReadAhead value using the Macintosh FSD Properties dialog.
For instructions, refer to
Configuring User Mount Options
in this guide, or refer to the Macintosh
FSD help system.
2. Set the Cache Memory Limit by typing the following command:
sudo sysctl -w debug.omfs_cacheMaxMem = NNN
where “NNN” is the number of megabytes.
Setting Memory Usage Parameters on Windows Clients
Setting Windows FSD Properties
in this guide to configure both the ReadAhead value and
Cache Memory Limit. Instructions are also provided in the Windows FSD help system.
Setting Memory Usage Parameters on Linux Clients
Follow these steps if you wish to change the memory usage parameters from their default values.
Use the formula provided in
Calculating the Cache Memory Limit
to determine how much cache
memory is needed.