Check the following UNIX kernel parameters and modify them if necessary:
On UNIX platforms, each process may only have a certain number of files open at once. If you create a large number of indexes and queues during routine operation, the TREX processes, in particular the queue server and index server, open a lot of files.
With many UNIX installations, the value for the maximum number of files that the processes are allowed to have open is too low. The parameter must have the following value:
Operating System | Value |
---|---|
AIX, HP-UX, Sun Solaris |
At least 2048 |
Linux |
At least 1024 |
The process size should be at least 2GB.
The process size is not limited for AIX and Sun Solaris.
Since TREX can also use files that are larger than 2GB, these must be activated at operating system level.
The TREX directory contains a test program that you can use to check whether the kernel parameters are set at a suitable level. If this is not the case, you should change the kernel parameters.
Checking Kernel Parameters
. TREXSettings.sh
source TREXSettings.csh
portlibtester.x -file
Number of open files:
This command creates test files in the directory /tmp/portlibtester. The test must give a result of at least 1000 files (Linux) or 2000 files for other UNIX platforms. If this is not the case, you should change the kernel parameters.
portlibtester.x -mem
This command calls upon as much main memory as possible. The test must output the value 1900 MB at least. If this is not the case, you should change the kernel parameters.
Changing Kernel Parameters
AIX
chuser nofiles=2000 trx<instance_number>
trx<instance_number>:
nofiles=2000
HP-UX
Changing the process size
Kernel Parameter | Lowest Acceptable Value |
---|---|
Process Size | |
maxdsiz |
0X80000000 or 2147483648 |
maxdsiz_64bit |
0X80000000 or 2147483648 |
maxtsiz |
0X40000000 or 1073741824 |
maxtsiz_64bit |
0X40000000 or 1073741824 |
Number of Open Files | |
maxfiles |
2048 |
maxfiles_lim |
2048 |
nfile |
20000 |
Activating files larger than 2 GB
fsadm -o largefiles <mount-point>
In doing this, you activate usage of files larger than 2 GB on a certain file system.
Linux
ulimit -n 1024
unlimit openfiles
TREXSettings.csh is not relevant for the TREX daemon. It is only relevant if you start the TREX servers manually or execute test scripts.
Sun Solaris
set rlim_fd_max=2048
set rlim_fd_cur=2048
Result
After making the change, execute portlibtester.x -file again. If the number of open files is still too low, the UNIX system administrator must have restricted this parameter in another way. Contact the UNIX system administrator to remove this restriction.
Note for Linux: If you receive error messages during indexing, the value 1024 for the number of open files may not be sufficient. If this is the case, run TREX on root (you can only raise the parameter value to 2048 on root). Proceed as follows:
ulimit -n 2048
unlimit openfiles
TREXSettings.csh is not relevant for the TREX daemon. It is only relevant if you start the TREX servers manually or execute test scripts.
#userid = trx<instance_number>
#groupid = <group>
This change causes the TREX daemon to run on root next time it starts.