Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Some customers may benefit by moving files that NMIS reads/writes to very often to a RAM Disk.  We have seen this improve performance on pollers that have shared storage and 2,000+ nodes provisioned.  The concept is that NMIS will be able to read/write to RAM faster than the shared storage.  Most of these the files that NMIS touches very often are found in the nmis8/var directory.

...

Code Block
mount -t tmpfs -o size=1000M tmpfs /media/ramdisk/
mkdir -p /media/ramdisk/nmis8/var
ln -s /data/nmis8/var/events /media/ramdisk/nmis8/var
/usr/local/nmis8/admin/fixperms.pl

Use the df command to confirm that the ramdisk was created.

Code Block
[root@TEST]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_nmis64-lv_root
                       16G   11G  4.1G  73% /
tmpfs                 5.9G     0  5.9G   0% /dev/shm
/dev/sda1             477M   75M  377M  17% /boot
/dev/mapper/vg_nmis64_data-lv_data
                      246G   95G  139G  41% /data
/dev/mapper/vg_nmis64-lv_var
                       20G   10G  8.3G  55% /var
tmpfs                1000M   30M  971M   3% /media/ramdisk

 

Step #3 - Disable NMIS

We need to disable NMIS so that it will not attempt to modify the files as we are point nmis8/var to the new RAM disk.  Comment out any jobs in /etc/cron.d/nmis that may run during the next 20 minutes.  Here's an example of a couple cron jobs that should be commented out.

...

Step #4 - Point nmis8/var at the RAM Disk

Since we are planning to put a sym link in /usr/local/nmis8/ for /var pointing at the new RAM disk; verify that in /usr/local/nmis8/conf/Config.nmis nmis8/var points to /usr/local/nmis8/var.  Here's a sample of the directories configuration in that file.

Code Block
title/usr/local/nmis8/conf/Config.nmis
  'directories' => {
    '<menu_base>' => '<nmis_base>/menu',
    '<nmis_admin>' => '<nmis_base>/admin',
    '<nmis_backups>' => '<nmis_data>/backups',
    '<nmis_base>' => '/usr/local/nmis8',
    '<nmis_bin>' => '<nmis_base>/bin',
    '<nmis_cgi>' => '<nmis_base>/cgi-bin',
    '<nmis_conf>' => '<nmis_base>/conf',
    '<nmis_data>' => '<nmis_base>',
    '<nmis_logs>' => '<nmis_base>/logs',
    '<nmis_menu>' => '<nmis_base>/menu',
    '<nmis_models>' => '<nmis_base>/models',
    '<nmis_var>' => '<nmis_data>/var',
    'config_logs' => '<nmis_logs>/config',
    'database_root' => '<nmis_data>/database',
    'json_logs' => '<nmis_logs>/json',
    'log_root' => '<nmis_logs>',
    'mib_root' => '<nmis_base>/mibs',
    'plugin_root' => '<nmis_conf>/plugins',
    'report_root' => '<nmis_base>/htdocs/reports',
    'script_root' => '<nmis_conf>/scripts',
    'web_root' => '<nmis_base>/htdocs'
  },

Create the sym link in /usr/local/nmis8/ sending /var to the RAM disk.

Code Block
ln -s /media/ramdisk/nmis8/var/ /usr/local/nmis8

Step #5 - Re-enable NMIS

Uncomment any cron jobs that had been commented out previously in step #4.

Step #6 - Verify

Take a look at the /usr/local/nmis8/var directory and confirm that node.json and view.json files have been created.  Also verify that the NMIS GUI is functioning normally.