]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Limit memory used for select() statistics. It was allocating space for
authorhno <>
Tue, 17 Jul 2001 16:35:46 +0000 (16:35 +0000)
committerhno <>
Tue, 17 Jul 2001 16:35:46 +0000 (16:35 +0000)
up to SQUID_MAXFD active filedescriptors per select(), but we are
only interested in a much smaller range.

This statistics could use quite a bit of memory when SQUID_MAXFD is large
(think I measured something like 8MB for 16K filedescriptors)

src/stat.cc

index 62fab338a181d59e68016e96fe5a1871dad03229..067dd6aa7ec50ec548dc3ca3d63c73fa5e48ee93 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.cc,v 1.346 2001/05/27 23:13:43 hno Exp $
+ * $Id: stat.cc,v 1.347 2001/07/17 10:35:46 hno Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -986,7 +986,7 @@ statCountersInitSpecial(StatCounters * C)
     statHistEnumInit(&C->comm_icp_incoming, INCOMING_ICP_MAX);
     statHistEnumInit(&C->comm_dns_incoming, INCOMING_DNS_MAX);
     statHistEnumInit(&C->comm_http_incoming, INCOMING_HTTP_MAX);
-    statHistIntInit(&C->select_fds_hist, SQUID_MAXFD);
+    statHistIntInit(&C->select_fds_hist, 256); /* was SQUID_MAXFD, but it is way too much. It is OK to crop this statistics */
 }
 
 /* add special cases here as they arrive */