[sr-dev] git:master: usrloc: hash_size default value set to 10
Daniel-Constantin Mierla
miconda at gmail.com
Thu Oct 2 09:52:46 CEST 2014
Module: sip-router
Branch: master
Commit: 1f1b81ed76dda3a889ffec52c173c53b2225dee4
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1f1b81ed76dda3a889ffec52c173c53b2225dee4
Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: Thu Oct 2 09:51:46 2014 +0200
usrloc: hash_size default value set to 10
- as discussed on mailing lists
---
modules/usrloc/README | 6 +++---
modules/usrloc/doc/usrloc_admin.xml | 6 +++---
modules/usrloc/ul_mod.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/modules/usrloc/README b/modules/usrloc/README
index 688b2d9..f480ad9 100644
--- a/modules/usrloc/README
+++ b/modules/usrloc/README
@@ -689,14 +689,14 @@ modparam("usrloc", "fetch_rows", 3000)
3.26. hash_size (integer)
The number of entries of the hash table used by usrloc to store the
- location records is 2^hash_size. For hash_size=4, the number of entries
+ location records is 2^hash_size. For hash_size=4, the number of slots
of the hash table is 16.
- Default value is "9".
+ Default value is "10" (1024 slots).
Example 1.26. Set hash_size parameter
...
-modparam("usrloc", "hash_size", 10)
+modparam("usrloc", "hash_size", 12)
...
3.27. preload (string)
diff --git a/modules/usrloc/doc/usrloc_admin.xml b/modules/usrloc/doc/usrloc_admin.xml
index a256e7a..0f99681 100644
--- a/modules/usrloc/doc/usrloc_admin.xml
+++ b/modules/usrloc/doc/usrloc_admin.xml
@@ -722,19 +722,19 @@ modparam("usrloc", "fetch_rows", 3000)
<title><varname>hash_size</varname> (integer)</title>
<para>
The number of entries of the hash table used by usrloc to store the
- location records is 2^hash_size. For hash_size=4, the number of entries
+ location records is 2^hash_size. For hash_size=4, the number of slots
of the hash table is 16.
</para>
<para>
<emphasis>
- Default value is <quote>9</quote>.
+ Default value is <quote>10</quote> (1024 slots).
</emphasis>
</para>
<example>
<title>Set <varname>hash_size</varname> parameter</title>
<programlisting format="linespecific">
...
-modparam("usrloc", "hash_size", 10)
+modparam("usrloc", "hash_size", 12)
...
</programlisting>
</example>
diff --git a/modules/usrloc/ul_mod.c b/modules/usrloc/ul_mod.c
index d3a1021..5992258 100644
--- a/modules/usrloc/ul_mod.c
+++ b/modules/usrloc/ul_mod.c
@@ -166,7 +166,7 @@ int desc_time_order = 0; /*!< By default do not enable timestamp ordering */
int handle_lost_tcp = 0; /*!< By default do not remove contacts before expiration time */
int ul_fetch_rows = 2000; /*!< number of rows to fetch from result */
-int ul_hash_size = 9;
+int ul_hash_size = 10;
int ul_db_insert_null = 0;
/* flags */
More information about the sr-dev
mailing list