Please try the attached patch.  It's not exactly perfect but it might
solve your problem.  Let me know.

-Bosko

On Thu, Jan 06, 2005 at 02:12:33PM +0000, Chris wrote:
> Hi
> 
> After reading the release notes and upgrading my server's I had set
> the following in my /boot/loader.conf.
> 
> kern.ipc.nmbclusters="0"
> 
> This is supposed to make the limit to unlimited as I understood from
> the docs, but a user on one of my server's reported slow download
> speeds he was testing with wget and fetch, so we compared with another
> FreeBSD server (5.2.1) on the same network and sure enough there was a
> massive difference (45mbit on the other server 5mbit on mine), I spent
> ages checking all my tweaks and changes I made comparing between the 2
> server's and ended up checking my loader.conf and tried setting a
> value and leaving it as auto, both of these changes fixed the download
> speed issue but setting to "0" introduces the problem.
> 
> Has anyone else noticed this?
> 
> Chris
> _______________________________________________
> [email protected] mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "[EMAIL PROTECTED]"

-- 
Bosko Milekic
[EMAIL PROTECTED]
[EMAIL PROTECTED]
Index: src/sys/kern/kern_mbuf.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/kern_mbuf.c,v
retrieving revision 1.4
diff -u -r1.4 kern_mbuf.c
--- src/sys/kern/kern_mbuf.c    20 Sep 2004 08:52:04 -0000      1.4
+++ src/sys/kern/kern_mbuf.c    6 Jan 2005 22:37:34 -0000
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 2004
+ * Copyright (c) 2004, 2005
  *     Bosko Milekic <[EMAIL PROTECTED]>.
  *     All rights reserved.
  *
@@ -85,13 +85,16 @@
 int nmbclusters;
 struct mbstat mbstat;
 
+static int nmbclusters2;
+
 static void
 tunable_mbinit(void *dummy)
 {
 
        /* This has to be done before VM init. */
        nmbclusters = 1024 + maxusers * 64;
-       TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters);
+       nmbclusters2 = nmbclusters;
+       TUNABLE_INT_FETCH("kern.ipc.nmbclusters", &nmbclusters2);
 }
 SYSINIT(tunable_mbinit, SI_SUB_TUNABLES, SI_ORDER_ANY, tunable_mbinit, NULL);
 
@@ -141,8 +144,8 @@
            NULL, NULL, MSIZE - 1, UMA_ZONE_MAXBUCKET);
        zone_clust = uma_zcreate("MbufClust", MCLBYTES, mb_ctor_clust,
            mb_dtor_clust, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_REFCNT);
-       if (nmbclusters > 0)
-               uma_zone_set_max(zone_clust, nmbclusters);
+       if (nmbclusters2 > 0)
+               uma_zone_set_max(zone_clust, nmbclusters2);
        zone_pack = uma_zsecond_create("Packet", mb_ctor_pack, mb_dtor_pack,
            mb_init_pack, mb_fini_pack, zone_mbuf);
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to