Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Wed Jul 17, 2019 10:00 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: [HOWTO] Reduce CPU/disk I/O by controlling MIB compilation
PostPosted: Sun Jul 25, 2010 8:53 am 
Offline
User avatar

Joined: Mon Sep 25, 2006 7:44 pm
Posts: 7
Is Cacti running slowly for you? Missing polls, gaps in graphs, poor performance on the system? It's 7PM, do you know what your SNMP library is doing?

Cacti depends very heavily on the Net-SNMP tools. By default, Net-SNMP comes with 59 MIB files stored usually in /usr/share/snmp/mibs representing some 1.7MB of disk. Newer Linux distributions will put MIB files for installed software packages there as well.

snmpget/snmpwalk/snmpbulkwalk perform run-time compilation of all MIB files when they execute. Depending on the quantity and size of MIBs and polled items, you could be scanning these files hundreds or thousands of times per hour. The Cacti templates I have seen don't usually refer to objects by name, so this may be pointless.

The first thing to try is removing MIB files from the default directory that you don't need or want.

Many people customize their Net-SNMP installation with /etc/snmp/snmp.conf:

defVersion 2c
defCommunity NOTPUBLIC!
mibdirs +/mycompany/mibs
mibAllowUnderline true
mibs ALL

An easy solution for this is to set the MIBDIRS environment variable for Net-SNMP in your include/config.php.

Including a - before the name removes a dir from the list:
putenv("MIBDIRS=-/mycompany/mibs");
Or just make sure there's nothing to scan (this may generate errors):
putenv("MIBDIRS="");

See the snmpcmd man page for more information.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group