32- bit or 64-bit counter ?

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
TFC
Cacti Pro User
Posts: 722
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

32- bit or 64-bit counter ?

#1 Post by TFC » Fri Nov 12, 2004 8:21 am

Hi,
Which one gives correct traffic load of 155Mbit/sec backbone??

User avatar
TFC
Cacti Pro User
Posts: 722
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

#2 Post by TFC » Fri Nov 12, 2004 8:33 am

I mean for Cisco devices:
Q. When should 64-bit counters be used?

A. RFC 2233 adopted expanded 64-bit counters for high capacity interfaces in which 32-bit counters do not provide enough capacity and wrap too fast.
As the speed of network media increases, the minimum time in which a 32-bit counter wraps decreases. For example, a 10 Mbps stream of back-to-back, full-size packets causes ifInOctets to wrap in just over 57 minutes. At 100 Mbps, the minimum wrap time is 5.7 minutes, and at 1 Gbps, the minimum is 34 seconds.

Note: The SNMP counters wrap, the CLI counters don't.

For interfaces that operate at 20,000,000 (20 million) bits per second or less, you must use 32-bit byte and packet counters. For interfaces that operate faster than 20 million bits per second, and slower than 650,000,000 bits per second, you must use 32-bit packet counters and 64-bit octet counters. For interfaces that operate at 650,000,000 bits/second or faster, 64-bit packet and octet counters must be used.

Correspondingly, Cisco IOS Software does not support 64-bit counters for interface speeds of less than 20Mbps. This means that 64-bit counters are not supported on 10Mb Ethernet ports, only 100 Mb Fast-Ethernet and other high speed ports support 64-bit counters.

jcaesar
Posts: 32
Joined: Mon Nov 01, 2004 5:07 pm
Location: Atlanta, GA

#3 Post by jcaesar » Fri Nov 12, 2004 9:42 am

You'll want to use the 64-bit counters. The max you can get with the 32-bit is around 114Mb/sec. During the times that it bursts above that limit, your graphs will be wrong if using the 32-bit counters.

User avatar
TFC
Cacti Pro User
Posts: 722
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

#4 Post by TFC » Fri Nov 12, 2004 9:45 am

But as you red above, cisco says different?
Why?

User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

#5 Post by bulek » Sat Nov 13, 2004 7:37 pm

Cisco says exactly what jcaesar said. For interfaces faster than 20Mb you should use 64bit octets counters (you count octets not packets for traffic presentation).

- Piotr

Basilio Cat
Posts: 25
Joined: Sun Sep 12, 2004 1:13 pm

#6 Post by Basilio Cat » Fri Nov 19, 2004 6:45 am

Well, i'd say IF interface has speed GREATER than 100Mbit, you MUST use 64-bit counter.

If speed is exactly 100Mbit, you may use it or not - there's no big difference (adittionally SNMPv1 has only 32-bit support, so using v2c and PHP poller causes heavy load - v2c calls are implemented via external binary only)

User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

#7 Post by bulek » Fri Nov 19, 2004 9:54 am

Then you can be wrong :). I can easily poll OC-3 speed interface (155 Mb) with polling interval of 3 minutes (or less) using 32-bit counters. I can do the same for 1Gb interface polling it every 30 sec. This is why I said "should" because it all depends on the polling interval.

- Piotr

User avatar
TFC
Cacti Pro User
Posts: 722
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

#8 Post by TFC » Mon Nov 22, 2004 1:37 am

I use 5 min intervals. İn this case, which counter must be used??

User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

#9 Post by bulek » Mon Nov 22, 2004 12:13 pm

For your 155Mbit backbone you have to use 64-bit counters.

- Piotr

arkand
Posts: 27
Joined: Wed Oct 13, 2004 10:12 am
Location: Spain

#10 Post by arkand » Tue Nov 23, 2004 9:45 am

I put my question in Scripts and Other Addons for Cacti

The topic is Cati and MRTG

The link
http://forums.cacti.net/viewtopic.php?t=5334


ang now ?, for OC-3 , what are the max value ?
for OC-12 ?

User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

#11 Post by bulek » Thu Nov 25, 2004 5:19 pm

Both for OC-3 and OC-12 you should use 64-bit counters. Here you have the correct data source maximum values for this kind if interfaces (in bytes/sec):
OC-3: 19375000
OC-12: 77750000

Remember to delete your RRD files whenever you change maximum value since Cacti in the current version is unable to update RRD files with new maximum values (or update them manually with rrdtool tune command).

- Piotr

fgk

#12 Post by fgk » Thu Nov 25, 2004 6:54 pm

why would anyone use 32 bit counters?

What counters does the total bandwith graph type use?

arkand
Posts: 27
Joined: Wed Oct 13, 2004 10:12 am
Location: Spain

#13 Post by arkand » Fri Nov 26, 2004 11:28 am

Thaks bulek.

But, if a OC 3 interface is a 155 MB, why the max value are 19375000 ?

If a OC 12 is a 622 Mb, max value 77750000 ?

In MRTG the max value are for OC 3 : Bandwidth: 151.88 Mbps
OC12 : Bandwidth: 607.50 Mbps

If a Gigabit max value are 100000000 ( 1000 MB ), a OC 12 max value 62200000 ( 622 MB ), no ?


( That is with In/Out 64-bits counters in cacti )

I not understand very good that bulek.

Sorry for my English.

User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

#14 Post by bulek » Tue Nov 30, 2004 5:06 am

This is very simple. Counters count BYTES... not BITS. So when you configure maximum value you have to enter maximum rate in BYTES/SECOND.

OC-3: 155000000 bits/sec = 19375000 bytes/sec
OC-12: 622000000 bits/sec = 77750000 bytes/sec
Gbit: 1000000000 bits/sec = 125000000 bytes/sec

Cacti by default incorrectly sets maximum value to link speed in bits/sec. I hope it explains everything.

- Piotr

Post Reply