From owner-freebsd-questions@FreeBSD.ORG Mon Oct 14 16:54:42 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CFFC73B5 for ; Mon, 14 Oct 2013 16:54:42 +0000 (UTC) (envelope-from cjpugmed@gmail.com) Received: from mail-vc0-x244.google.com (mail-vc0-x244.google.com [IPv6:2607:f8b0:400c:c03::244]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8FD3726E4 for ; Mon, 14 Oct 2013 16:54:42 +0000 (UTC) Received: by mail-vc0-f196.google.com with SMTP id ia6so1171553vcb.11 for ; Mon, 14 Oct 2013 09:54:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ciAkb67MBtA18YHKgfPBZOQ1lsfkj0PYbH5XDX1xBYQ=; b=tlNoOEkJT8DnPFfibgwEr1RpHaiDNmnoy2Bb5Jxcq9y62o75vHUvaDUUv5Vm27dI/f s9/gX1FE8vaodBelswUJ17b0+RY9/kIGwEUFUBibsdMhzt6lKE0ACF7/TkDup/piX7Q5 PmCzu7nh3HtobFIKdobLzSZU7/1EyG77r1MrL+rkBPsXCFDqwmWV+JuxO/Rf0QHv1FNw /uXwy+/bjGiMVcJQ1o11Ug0c1CGudIfA7B5sFXfS/c05BScWY9xngc1utLizvd5ebHoy HrtWMFnVdRcHhq0aXVS3jn7ZnVxulcHiZJL2TmwBcu4m7vGhZlKsMdIqouFzf4YG5FNQ HcZw== MIME-Version: 1.0 X-Received: by 10.58.67.9 with SMTP id j9mr7617310vet.3.1381769681599; Mon, 14 Oct 2013 09:54:41 -0700 (PDT) Received: by 10.220.1.17 with HTTP; Mon, 14 Oct 2013 09:54:41 -0700 (PDT) In-Reply-To: References: Date: Mon, 14 Oct 2013 18:54:41 +0200 Message-ID: Subject: Re: Tuning /etc/sysctl.conf From: Carlos Jacobo Puga Medina To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Oct 2013 16:54:43 -0000 Mmm... just a correction in /etc/sysctl.conf, it seems that by mistake I've copied a website link into the file. Sorry, it was a copy-paste error :) % cat /etc/sysctl.conf # $FreeBSD: release/9.2.0/etc/sysctl.conf 112200 2003-03-13 18:43:50Z mux $ # # This file is read when going to multi-user and its contents piped thru # ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details. # # Uncomment this to prevent users from seeing information about processes that # are being run under another UID. #security.bsd.see_other_uids=0 vfs.usermount=1 hw.snd.default_unit=2 kern.ipc.maxsockbuf=16777216 kern.ipc.nmbclusters=32768 kern.ipc.shm_allow_removed=1 kern.ipc.somaxconn=8192 kern.maxfiles=65536 kern.maxfilesperproc=32768 net.inet.tcp.blackhole=2 net.inet.tcp.delayed_ack=0 net.inet.tcp.path_mtu_discovery=0 net.inet.tcp.recvbuf_auto=1 net.inet.tcp.recvbuf_inc=16384 net.inet.tcp.recvbuf_max=16777216 net.inet.tcp.recvspace=65536 net.inet.tcp.rfc1323=1 net.inet.tcp.sendbuf_auto=1 net.inet.tcp.sendbuf_inc=8192 net.inet.tcp.sendspace=65536 net.inet.udp.blackhole=1 net.inet.udp.maxdgram=57344 net.inet.udp.recvspace=65536 net.local.stream.recvspace=65536 net.local.stream.sendspace=65536 net.inet.tcp.sendbuf_max=16777216 net.inet.ip.random_id=1 # Allow for up 2 GB of wired memory. vm.max_wired=524288 2013/10/14 Carlos Jacobo Puga Medina > Hi people, > > I'm very interested to tuning /etc/sysctl.conf according to the > specifications of my PC. I've been reading some guides [1], tutorials > [2-3], Q&A [4] and the FreeBSD Handbook's related section 12.12 Tuning with > sysctl(8), but I think it's much more convenient if I contrast it with > other examples or experienced users. > > Here is my relevant info outputs for help to improve the sysctl(8) > variables. > > % uname -a > FreeBSD freebsd 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Fri Sep 27 > 03:52:52 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC > i386 > > % dmesg | grep CPU > CPU: Intel(R) Pentium(R) 4 CPU 2.40GHz (2394.06-MHz 686-class CPU) > cpu0: on acpi0 > p4tcc0: on cpu0 > > % dmesg | grep memory > real memory = 2147483648 (2048 MB) > avail memory = 2082701312 (1986 MB) > > % pciconf -lvv | grep -n2 Ethernet > 41-sis0@pci0:0:4:0: class=0x020000 card=0x80a71043 chip=0x09001039 > rev=0x91 hdr=0x00 > 42- vendor = 'Silicon Integrated Systems [SiS]' > 43: device = 'SiS900 PCI Fast Ethernet' > 44- class = network > 45- subclass = ethernet > > My /etc/sysctl.conf > > # $FreeBSD: release/9.2.0/etc/sysctl.conf 112200 2003-03-13 18:43:50Z mux $ > # > # This file is read when going to multi-user and its contents piped thru > # ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details. > # > > # Uncomment this to prevent users from seeing information about processes > that > # are being run under another UID. > #security.bsd.see_other_uids=0 > vfs.usermount=1 > hw.snd.default_unit=2 > kern.ipc.maxsockbuf=16777216 > kern.ipc.nmbclusters=32768 > kern.ipc.shm_allow_removed=1 > kern.ipc.somaxconn=8192 > kern.maxfiles=65536 > kern.maxfilesperproc=32768 > net.inet.tcp.blackhole=2 > net.inet.tcp.delayed_ack=0 > net.inet.tcp.path_mtu_discovery=0 > net.inet.tcp.recvbuf_auto=1 > net.inet.tcp.recvbuf_inc=16384 > net.inet.tcp.recvbuf_max=16777216 > net.inet.tcp.recvspace=65536 > net.inet.tcp.rfc1323=1 > net.inet.tcp.sendbuf_auto=1 > net.inet.tcp.sendbuf_inc=8192 > net.inet.tcp.sendspace=65536 > net.inet.udp.blackhole=1 > net.inet.udp.maxdgram=57344 > net.inet.udp.recvspace=65536 > net.local.stream.recvspace=65536 > net.local.stream.sendspace=65536 > net.inet.tcp.sendbuf_max=16777216 > net.inet.ip.random_id=1 > > http://serverfault.com/questions/64356/freebsd-performance-tuning-sysctls-loader-conf-kernel > # Allow for up 2 GB of wired memory. > vm.max_wired=524288 > > I will appreciate any input about the subject. > --CJPM > > [1] http://harryd71.blogspot.com.es/2008/10/tuning-freenas-zfs.html > [2] https://wiki.freebsd.org/SystemTuning#SYSCTL_TUNING > [3] https://wiki.freebsd.org/NetworkPerformanceTuning > [4] > http://serverfault.com/questions/64356/freebsd-performance-tuning-sysctls-loader-conf-kernel >