idnits 2.17.1 draft-haresh-sushrut-mib-classification-01.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document doesn't use any RFC 2119 keywords, yet seems to have RFC 2119 boilerplate text. -- Couldn't find a document date in the document -- date freshness check skipped. Checking references for intended status: Experimental ---------------------------------------------------------------------------- == Unused Reference: 'RFC2578' is defined on line 186, but no explicit reference was found in the text == Unused Reference: 'RFC3418' is defined on line 189, but no explicit reference was found in the text == Unused Reference: 'RFC3411' is defined on line 193, but no explicit reference was found in the text == Unused Reference: 'RFC5226' is defined on line 197, but no explicit reference was found in the text -- Obsolete informational reference (is this intentional?): RFC 5226 (Obsoleted by RFC 8126) Summary: 0 errors (**), 0 flaws (~~), 6 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 INTERNET-DRAFT Haresh Khandelwal & Sushrut Deshpande 3 Intended Status: Experimental Cisco Systems 4 Expires: March 2012 6 SNMPD to use cache and shared database based on MIB Classification 7 draft-haresh-sushrut-mib-classification-01 9 Abstract 11 This memo defines classification of SNMP MIBs to either use SNMP 12 cache database and shared database (SDB) mechanism to reduce high CPU 13 usage while SNMP GET REQUEST, GETNEXT REQUEST, GETBULK REQUEST are 14 continuously performed from network management system (NMS)/SNMP 15 manager/SNMP MIB browser to managed device. 17 Status of this Memo 19 This Internet-Draft is submitted to IETF in full conformance with the 20 provisions of BCP 78 and BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF), its areas, and its working groups. Note that 24 other groups may also distribute working documents as 25 Internet-Drafts. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 The list of current Internet-Drafts can be accessed at 33 http://www.ietf.org/1id-abstracts.html 35 The list of Internet-Draft Shadow Directories can be accessed at 36 http://www.ietf.org/shadow.html 38 Copyright and License Notice 40 Copyright (c) 2012 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (http://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 Table of Contents 55 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 56 1.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . 3 57 2. MIB classification . . . . . . . . . . . . . . . . . . . . . . 3 58 2.1 How CPU usage goes high . . . . . . . . . . . . . . . . . . 3 59 2.2 MIB Classification . . . . . . . . . . . . . . . . . . . . . 4 60 2.3 How SNMP CACHE and SHARED DATABASE works . . . . . . . . . . 4 61 2.4 How CPU usage reduced . . . . . . . . . . . . . . . . . . . 4 62 3 Security Considerations . . . . . . . . . . . . . . . . . . . . 6 63 4 IANA Considerations . . . . . . . . . . . . . . . . . . . . . . 6 64 5 References . . . . . . . . . . . . . . . . . . . . . . . . . . 6 65 5.1 Normative References . . . . . . . . . . . . . . . . . . . 6 66 5.2 Informative References . . . . . . . . . . . . . . . . . . 6 67 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 6 69 1 Introduction 71 Continuous GET REQUEST, GETNEXT REQUEST, GETBULK REQUEST on managed 72 device results into high CPU usage. High CPU usage is result of high 73 process interactions between SNMP process and requested OID's process 74 when OID came from GET REQUEST, GETNEXT REQUEST, GETBULK REQUEST. 75 This draft suggests the way to reduce these process interactions in 76 order to reduce CPU usage. This approach also suggests way to reduce 77 high CPU usage with accurate OID values. 79 1.1 Terminology 81 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 82 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 83 document are to be interpreted as described in RFC 2119 [RFC2119]. 85 2. MIB classification 87 2.1 How CPU usage goes high 89 When SNMP protocol data units (SNMP PDU) are received by SNMPD 90 running on managed device (router, switch etc...), SNMPD de capsulate 91 PDU and retrieves requested ODI from PDU. After getting OIDs, SNMPD 92 interacts with process under whom requested OIDs and its value 93 reside. 95 For example, NMS sends SNMP GET REQUEST with seeking of interface 96 operational status whose OID is .1.3.6.1.2.1.2.2.1.8. This GET 97 REQUEST PDU is received at managed device's SNMPD which in turn de 98 capsulated PDU and find out that "ifOperStatus" is requested from 99 NMS. SNMPD then interacts with process who handles interface process 100 and gets OID value and builds RESPONSE PDU which sent to NMS. 102 Like as when NMS keeps polling managed device, it leads very high 103 process interactions between SNMPD and requested OID's. generally, 104 process interactions happen through common mechanism like MTS 105 (message transaction service) in NX-OS. processes talk with each 106 other using such messages. so, when processes have to talk with each 107 other frequently, transactions of interaction messages also go very 108 high. such high amount of transactions increase a CPU usage of the 109 system which in turns result into very high CPU usage. SNMP polling 110 is such a method which also leads to high CPU usage of managed 111 device. generally service providers keep monitoring network devices 112 using SNMP for all time and running other application parallel to 113 monitoring it. so if SNMP polling consume higher CPU, it may lead 114 other processes to CPU starvation which may lead device to strange 115 unknown behavior. To avoid this, we are proposing this solution where 116 we reduce process interactions, so we can achieve less message 117 transactions and less CPU consumption. 119 2.2 MIB Classification 121 MIB Classification provides a solution to avoid high CPU usage. MIB 122 are classified into two categories. 124 i) Dynamic MIBs - Whose values change frequently (for example 125 ifMIB counters). 127 ii) Relatively Static MIBs - Whose values change occasionally 128 (for example VLAN MIB). 130 2.3 How SNMP CACHE and SHARED DATABASE works 132 SHARED DATABASE (SDB) is a database where component or process who 133 falls under "Dynamic MIBs" has to populate their supported ODIs 134 values. SNMPD will fetch ODI's value from this SHARED DATABASE when 135 ODI belongs to "Dynamic MIBs" category requested from NMS. Processes 136 taking part in SDB are completely responsible for OIDs values. So, if 137 it is ifMIB counter process for interface then it will be responsible 138 for interfaces counter values in SDB. SNMPD will pickup relevant 139 values for asked OIDs from SDB and will response back to MIB 140 browser/NMS. 142 SNMP CACHING is a database which is maintained by SNMPD of managed 143 device. This database contains ODIs values of "Relatively Static 144 MIBs". These ODI values filled to SNMP CACHE when SNMPD receives 145 ODI's value first time from requested OID's process.SNMPD will form 146 its own cache table which in turn, stores values of all processed 147 ODIs. So when next time same OID will be requested, SNMPD can 148 response from its own Cache table. Now, if value of OID from 149 "Relatively Static MIBs" changes, that process or component has to 150 inform SNMPD regarding its event with new values. SNMPD will update 151 its cache table with new ODI value. 153 SNMP cache table can be flushed in event of SNMP process 154 restart/crash/enable-disable. New cache table will be formed again 155 after recovery with 1st poll cycle. 157 SHARED DATABASE will be handled by individual process and should be 158 populated again in event of process crash/restart. 160 2.4 How CPU usage reduced 162 For NMS queries with MIB classification approach, SNMPD does not need 163 to talk with individual processes. According to MIB category, SNMP 164 process will fetch ODIs value from either of these two databases.so, 165 by this way, we can reduce the interaction messages between SNMPD and 166 other processes and still having accurate OID values from accurately 167 maintained database. As high process interactions are reduced, it 168 will reduce CPU usage also. 170 3 Security Considerations 172 This design is not changing SNMP packets. It does not apply on SNMP 173 SET operation. Communication between NMS and managed device is also 174 un changed, only internal process interaction changes are proposed 175 based on MIB classification.so, this design does not exhibit any 176 security threat. 178 4 IANA Considerations 180 5 References 182 5.1 Normative References 184 5.2 Informative References 186 [RFC2578] McCloghrie, et al., "Structure of Management Information 187 Version 2 (SMIv2)", RFC2578, April 1999. 189 [RFC3418] Presuhn, et al., "Management Information Base (MIB) for 190 the Simple Network Management Protocol (SNMP)", RFC3418, December 191 2002. 193 [RFC3411] Harrington, et al., "An Architecture for Describing Simple 194 Network Management Protocol (SNMP) Management Frameworks", RFC3411, 195 December 2002. 197 [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an 198 IANA Considerations Section in RFCs", BCP 26, RFC 5226,May 2008 200 [RFC2119] Bradner, "Key words for use in RFCs to Indicate 201 Requirement Levels", RFC2119, March 1997 203 Authors' Addresses 205 Name 206 Haresh Khandelwal 207 Sushrut Deshpande 209 EMail: hkhandel@cisco.com, susdeshp@cisco.com