of disk files open.
#
-# $Id: cf.data.pre,v 1.106 1998/09/09 18:21:50 wessels Exp $
+# $Id: cf.data.pre,v 1.107 1998/09/09 20:05:47 wessels Exp $
#
#
# SQUID Internet Object Cache http://squid.nlanr.net/Squid/
min_http_poll_cnt 8
DOC_END
+NAME: max_open_disk_fds
+TYPE: int
+LOC: Config.max_open_disk_fds
+DEFAULT: 0
+DOC_NONE
+
EOF
/*
- * $Id: fd.cc,v 1.26 1998/07/22 20:37:18 wessels Exp $
+ * $Id: fd.cc,v 1.27 1998/09/09 20:05:49 wessels Exp $
*
* DEBUG: section 51 Filedescriptor Functions
* AUTHOR: Duane Wessels
debug(51, 3) ("fd_close FD %d %s\n", fd, F->desc);
fdUpdateBiggest(fd, F->open = FD_CLOSE);
Number_FD--;
+ if (F->type == FD_FILE)
+ open_disk_fd--;
memset(F, '\0', sizeof(fde));
F->timeout = 0;
}
if (desc)
xstrncpy(F->desc, desc, FD_DESC_SZ);
Number_FD++;
+ if (type == FD_FILE)
+ open_disk_fd++;
}
void
/*
- * $Id: globals.h,v 1.66 1998/08/21 04:03:47 wessels Exp $
+ * $Id: globals.h,v 1.67 1998/09/09 20:05:49 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
extern int refresh_nocache_hack; /* 0 */
#endif
extern request_flags null_request_flags;
+extern int open_disk_fd; /* 0 */
/*
- * $Id: stat.cc,v 1.284 1998/09/04 23:05:02 wessels Exp $
+ * $Id: stat.cc,v 1.285 1998/09/09 20:05:50 wessels Exp $
*
* DEBUG: section 18 Cache Manager Statistics
* AUTHOR: Harvest Derived
Squid_MaxFD - Number_FD);
storeAppendPrintf(sentry, "\tReserved number of file descriptors: %4d\n",
RESERVED_FD);
+ storeAppendPrintf(sentry, "\tDisk files open: %4d\n",
+ open_disk_fd);
storeAppendPrintf(sentry, "Internal Data Structures:\n");
storeAppendPrintf(sentry, "\t%6d StoreEntries\n",
/*
- * $Id: store.cc,v 1.454 1998/09/09 16:47:08 wessels Exp $
+ * $Id: store.cc,v 1.455 1998/09/09 20:05:52 wessels Exp $
*
* DEBUG: section 20 Storage Manager
* AUTHOR: Harvest Derived
int negative_cached;
int too_big;
int private_key;
- int http_median_too_high;
+ int too_many_open_files;
int lru_age_too_low;
} no;
struct {
} else if (EBIT_TEST(e->flag, KEY_PRIVATE)) {
debug(20, 3) ("storeCheckCachable: NO: private key\n");
store_check_cachable_hist.no.private_key++;
-#if WIP
- } else if (statMedianSvc(5, MEDIAN_HTTP) > 2000.0) {
- debug(20, 2) ("storeCheckCachable: NO: median HTTP svc time = %d\n",
- statMedianSvc(5, MEDIAN_HTTP));
- store_check_cachable_hist.no.http_median_too_high++;
-#endif
+ } else if (Config.max_open_disk_fds && open_disk_fd > Config.max_open_disk_fds) {
+ debug(20, 2) ("storeCheckCachable: NO: too many disk files open\n");
+ store_check_cachable_hist.no.too_many_open_files++;
} else if (storeExpiredReferenceAge() < 300) {
debug(20, 2) ("storeCheckCachable: NO: LRU Age = %d\n",
storeExpiredReferenceAge());
store_check_cachable_hist.no.too_big);
storeAppendPrintf(sentry, "no.private_key\t%d\n",
store_check_cachable_hist.no.private_key);
- storeAppendPrintf(sentry, "no.http_median_too_high\t%d\n",
- store_check_cachable_hist.no.http_median_too_high);
+ storeAppendPrintf(sentry, "no.too_many_open_files\t%d\n",
+ store_check_cachable_hist.no.too_many_open_files);
storeAppendPrintf(sentry, "no.lru_age_too_low\t%d\n",
store_check_cachable_hist.no.lru_age_too_low);
storeAppendPrintf(sentry, "yes.default\t%d\n",
/*
- * $Id: structs.h,v 1.218 1998/09/09 18:18:05 wessels Exp $
+ * $Id: structs.h,v 1.219 1998/09/09 20:05:54 wessels Exp $
*
*
* SQUID Internet Object Cache http://squid.nlanr.net/Squid/
int icp_min_poll;
int http_min_poll;
} comm_incoming;
+ int max_open_disk_fds;
};
struct _SquidConfig2 {