ntop prior to 2.1 had lots of problems with the hashing sizes and was limited (15bit 
integer index) to 32K.  When Luca removed the resize, he increased the index variable 
size too.  

In fact, if you look at the current code, there is no upper limit defined.  That might 
be a bug, but there are reports of people running 'successfully' with 300K hosts...

If you're going to adjust the limits, the new constants are in globals-defines.h:

/*
 * Hash table sizing gets confusing... see the code in hash.c for the
 * actual details, but here is what's what as of May2002...
 *
 * The table is created of size CONST_HASH_INITIAL_SIZE...
 * When first extended, it grows to CONST_HASH_MINIMUM_SIZE
 * Between CONST_HASH_MINIMUM_SIZE and CONST_HASH_FACTOR_MAXIMUM,
 *           it grows by a multiplier, CONST_HASH_INCREASE_FACTOR
 * After growing to CONST_HASH_FACTOR_MAXIMUM it begins to grow by 
CONST_HASH_TERMINAL_INCREASE
 *
 * So, the pattern is:
 *
 * 32, 512, 1024, 2048, 4069, 8192, 12288 ...
 */

#define CONST_HASH_INITIAL_SIZE             32
#define CONST_HASH_MINIMUM_SIZE             512   /* Minimum after 1st extend */
#define CONST_HASH_FACTOR_MAXIMUM           4096  /* After it gets this big */
#define CONST_HASH_TERMINAL_INCREASE        4096  /*      grow by */
#define CONST_HASH_INCREASE_FACTOR          2     /* Between MINIMUM and TERMINAL, 
grow by... */

-----Burton

---------- Original Message ----------------------------------
From: "Ashley Gates" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date:  Mon, 13 Jan 2003 09:36:36 -0500

>I have a router that passes up to 25m/bits of traffic everyday and
>flow-export to ntop. Ntop will run for about 5-7 minutes and seg fault
>after the hash size has hit 32768.
>
>I've seen others listing this problem and point to the ntop.h for a
>possible cure, but I am using the precompiled RPM on RedHat 7.3.
>
>(I previously had a NetBSD 1.6 (i386) box, but the pkgsrc for ntop2.1
>appears to be faulty for the browser interface.)
>(Thanks Burton for the assistance last week!)
>
>I have also tried flow-exports from just a 2610 that has a T1 and 60
>percent circuit load at times with the same result just a longer death..
>20-30 mins before seg fault.
>
>If I built from source (ntop-03-01-10.tgz) and before compiling, change
>ntop.h to 65536 or higher would my hash problem go away??
>
>The box has 320 megs RAM on a P-II 450. - When using the larger router I
>see my memory consumption for ntop grows rapidly, before ntop dies it
>burns about 267 megs of RAM. This is true for the other router exports
>as well, just takes longer.. 
>
>I have read about a user that has this same problem and uses 512 megs
>RAM so my memory theory feels weak.
>
>What's the formula for flows to memory usage? I can stack the box with a
>gig of RAM if the chipset supports it and let you guys know if any head
>scratching starts..
>
>Ashley Gates
>Director of Network Operations
>Atlanta Broadband, Inc.
>http://www.atlantabroadband.net
>Office: 770.794.0767
>_______________________________________________
>Ntop mailing list
>[EMAIL PROTECTED]
>http://listgateway.unipi.it/mailman/listinfo/ntop
>


____________________________________________________________
Free 20MB Web Site Hosting and Personalized E-mail Service!
Get It Now At Doteasy.com http://www.doteasy.com/et/
_______________________________________________
Ntop mailing list
[EMAIL PROTECTED]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to