From owner-freebsd-current@FreeBSD.ORG Mon Jun 4 17:55:54 2007 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id CF3FF16A41F for ; Mon, 4 Jun 2007 17:55:54 +0000 (UTC) (envelope-from master@preved.cn) Received: from mc333.mccolo.com (mc333.mccolo.com [208.72.175.2]) by mx1.freebsd.org (Postfix) with ESMTP id BA3A313C447 for ; Mon, 4 Jun 2007 17:55:54 +0000 (UTC) (envelope-from master@preved.cn) Received: from mc333.mccolo.com (localhost [127.0.0.1]) by mc333.mccolo.com (Postfix) with ESMTP id 4F474114FB; Mon, 4 Jun 2007 10:55:47 -0700 (PDT) Received: from [10.99.0.2] (unknown [81.29.242.3]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mc333.mccolo.com (Postfix) with ESMTP id D1752114DA; Mon, 4 Jun 2007 10:55:45 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.3) In-Reply-To: <499c70c0706041042w7c5c70dbh382e0674dac90bb9@mail.gmail.com> References: <499c70c0706041042w7c5c70dbh382e0674dac90bb9@mail.gmail.com> Content-Type: text/plain; charset=KOI8-R; delsp=yes; format=flowed Message-Id: <34AE885F-1525-402E-84DA-B1F9E51F4B52@preved.cn> Content-Transfer-Encoding: quoted-printable From: Alexey Tarasov Date: Mon, 4 Jun 2007 21:55:46 +0400 To: Abdullah Ibn Hamad Al-Marri , current@freebsd.org X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: ClamAV using ClamSMTP Cc: Subject: Re: Intel C2D COREs not used equally in FreeBSD 7.0-CURRENT i386 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Jun 2007 17:55:54 -0000 Hi. > options SCHED_4BSD # 4BSD scheduler Try to use SCHED_ULE or SCHED_CORE. ::[ | | | | ]:: Alexey Tarasov master@preved.cn 04.06.2007, =D7 21:42, Abdullah Ibn Hamad Al-Marri =D0=C9=D3=C1=CC(=C1): > Hello, > > I have IRC services and it stored the dbs as MyISAM in MySQL 5.0.41 > which runs on dedicated C2D 6600 with 2 GB of ram. > > FreeBSD 7.0-CURRENT #4: Sun Jun 3 22:56:52 GMT 2007 i386 > > Here is my kernel config > > cpu I686_CPU > ident SERVICES > > options SCHED_4BSD # 4BSD scheduler > options PREEMPTION # Enable kernel thread =20 > preemption > options INET # InterNETworking > options FFS # Berkeley Fast Filesystem > options SOFTUPDATES # Enable FFS soft updates =20 > support > options UFS_ACL # Support for access =20 > control lists > options UFS_DIRHASH # Improve performance on =20 > big directories > options UFS_GJOURNAL # Enable gjournal-based UFS =20= > journaling > options GEOM_PART_GPT # GUID Partition Tables. > options GEOM_LABEL # Provides labelization > options COMPAT_43TTY # BSD 4.3 TTY compat [KEEP =20 > THIS!] > options COMPAT_FREEBSD4 # Compatible with FreeBSD4 > options COMPAT_FREEBSD5 # Compatible with FreeBSD5 > options COMPAT_FREEBSD6 # Compatible with FreeBSD6 > options SCSI_DELAY=3D5000 # Delay (in ms) before =20 > probing SCSI > options KTRACE # ktrace(1) support > options SYSVSHM # SYSV-style shared memory > options SYSVMSG # SYSV-style message queues > options SYSVSEM # SYSV-style semaphores > options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time > extensions > options KBD_INSTALL_CDEV # install a CDEV entry in /dev > options ADAPTIVE_GIANT # Giant mutex is adaptive. > options STOP_NMI # Stop CPUS using NMI =20 > instead of IPI > options SC_DISABLE_REBOOT # Disable reboot =20 > key sequence > > # To make an SMP kernel, the next two lines are needed > options SMP # Symmetric MultiProcessor =20 > Kernel > device apic # I/O APIC > > device acpi # Compile acpi in statically > > # Bus support. > device eisa > device pci > > # Bus support. > device eisa > device pci > > # ATA and ATAPI devices > device ata > device atadisk # ATA disk drives > options ATA_STATIC_ID # Static device numbering > > # atkbdc0 controls both the keyboard and the PS/2 mouse > device atkbdc # AT keyboard controller > device atkbd # AT keyboard > device vga # VGA video card driver > > # syscons is the default console driver, resembling an SCO console > device sc > > # PCI Ethernet NICs that use the common MII bus controller code. > # NOTE: Be sure to keep the 'device miibus' line in order to use =20 > these NICs! > device miibus # MII bus support > device sk # SysKonnect SK-984x & SK-982x =20 > gigabit Ethernet > > # Pseudo devices. > device loop # Network loopback > device random # Entropy device > device ether # Ethernet support > device pty # Pseudo-ttys (telnet etc) > device snp # Snoop Device > > # The `bpf' device enables the Berkeley Packet Filter. > # Be aware of the administrative consequences of enabling this! > # Note that 'bpf' is required for DHCP. > device bpf # Berkeley packet filter > > Here is the sysctl of kern > > kern.maxvnodes: 100000 > kern.maxproc: 6164 > kern.maxfiles: 32768 > kern.argmax: 262144 > kern.clockrate: { hz =3D 1000, tick =3D 1000, profhz =3D 666, stathz =3D= 133 } > kern.posix1version: 200112 > kern.ngroups: 16 > kern.job_control: 1 > kern.saved_ids: 0 > kern.bootfile: /boot/kernel/kernel > kern.maxfilesperproc: 11095 > kern.maxprocperuid: 5547 > kern.ipc.maxsockbuf: 262144 > kern.ipc.sockbuf_waste_factor: 8 > kern.ipc.somaxconn: 1024 > kern.ipc.max_linkhdr: 16 > kern.ipc.max_protohdr: 40 > kern.ipc.max_hdr: 56 > kern.ipc.max_datalen: 148 > kern.ipc.nmbjumbo16: 0 > kern.ipc.nmbjumbo9: 0 > kern.ipc.nmbjumbop: 0 > kern.ipc.nmbclusters: 25600 > kern.ipc.piperesizeallowed: 1 > kern.ipc.piperesizefail: 0 > kern.ipc.pipeallocfail: 0 > kern.ipc.pipefragretry: 0 > kern.ipc.pipekva: 16384 > kern.ipc.maxpipekva: 16777216 > kern.ipc.msgseg: 2048 > kern.ipc.msgssz: 8 > kern.ipc.msgtql: 40 > kern.ipc.msgmnb: 2048 > kern.ipc.msgmni: 40 > kern.ipc.msgmax: 16384 > kern.ipc.semaem: 16384 > kern.ipc.semvmx: 32767 > kern.ipc.semusz: 92 > kern.ipc.semume: 10 > kern.ipc.semopm: 100 > kern.ipc.semmsl: 60 > kern.ipc.semmnu: 30 > kern.ipc.semmns: 60 > kern.ipc.semmni: 10 > kern.ipc.semmap: 30 > kern.ipc.shm_allow_removed: 0 > kern.ipc.shm_use_phys: 0 > kern.ipc.shmall: 8192 > kern.ipc.shmseg: 128 > kern.ipc.shmmni: 192 > kern.ipc.shmmin: 1 > kern.ipc.shmmax: 33554432 > kern.ipc.maxsockets: 25600 > kern.ipc.numopensockets: 26 > kern.ipc.nsfbufsused: 0 > kern.ipc.nsfbufspeak: 5 > kern.ipc.nsfbufs: 6656 > kern.dummy: 0 > kern.ps_strings: 3217031152 > kern.usrstack: 3217031168 > kern.logsigexit: 1 > kern.iov_max: 1024 > kern.hostuuid: 802D1F15-461D-D711-A11F-C7ABFF8EBB17 > kern.arandom: 653627002 > kern.disks: ad2 ad0 > kern.geom.collectstats: 1 > kern.geom.debugflags: 0 > kern.geom.label.debug: 0 > kern.elf32.fallback_brand: -1 > kern.init_shutdown_timeout: 120 > kern.init_path: > /sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall > kern.acct_suspended: 0 > kern.acct_configured: 0 > kern.acct_chkfreq: 15 > kern.acct_resume: 4 > kern.acct_suspend: 2 > kern.cp_time: 5327530 0 60047 15732 9213550 > kern.openfiles: 121 > kern.kq_calloutmax: 4096 > kern.ps_arg_cache_limit: 256 > kern.stackprot: 7 > kern.randompid: 0 > kern.lastpid: 3158 > kern.ktrace.request_pool: 100 > kern.ktrace.genio_size: 4096 > kern.module_path: /boot/kernel;/boot/modules > kern.malloc_count: 134 > kern.fallback_elf_brand: -1 > kern.maxusers: 384 > kern.ident: SERVICES > kern.kstack_pages: 2 > kern.shutdown.kproc_shutdown_wait: 60 > kern.shutdown.poweroff_delay: 5000 > kern.sync_on_panic: 0 > kern.corefile: %N.core > kern.nodump_coredump: 0 > kern.coredump: 1 > kern.sugid_coredump: 0 > kern.sigqueue.alloc_fail: 0 > kern.sigqueue.overflow: 0 > kern.sigqueue.preallocate: 1024 > kern.sigqueue.max_pending_per_proc: 128 > kern.forcesigexit: 1 > kern.fscale: 2048 > kern.timecounter.tick: 1 > kern.timecounter.choice: TSC(-100) ACPI-fast(1000) i8254(0) dummy=20 > (-1000000) > kern.timecounter.hardware: ACPI-fast > kern.timecounter.nsetclock: 3 > kern.timecounter.ngetmicrotime: 1966 > kern.timecounter.ngetnanotime: 1 > kern.timecounter.ngetbintime: 0 > kern.timecounter.ngetmicrouptime: 4172907 > kern.timecounter.ngetnanouptime: 2512 > kern.timecounter.ngetbinuptime: 401300 > kern.timecounter.nmicrotime: 2986925 > kern.timecounter.nnanotime: 423 > kern.timecounter.nbintime: 2987361 > kern.timecounter.nmicrouptime: 3182 > kern.timecounter.nnanouptime: 8 > kern.timecounter.nbinuptime: 3825003 > kern.timecounter.stepwarnings: 0 > kern.timecounter.tc.i8254.mask: 65535 > kern.timecounter.tc.i8254.counter: 27888 > kern.timecounter.tc.i8254.frequency: 1193182 > kern.timecounter.tc.i8254.quality: 0 > kern.timecounter.tc.ACPI-fast.mask: 16777215 > kern.timecounter.tc.ACPI-fast.counter: 2515696 > kern.timecounter.tc.ACPI-fast.frequency: 3579545 > kern.timecounter.tc.ACPI-fast.quality: 1000 > kern.timecounter.tc.TSC.mask: 4294967295 > kern.timecounter.tc.TSC.counter: 4040078241 > kern.timecounter.tc.TSC.frequency: 2394010377 > kern.timecounter.tc.TSC.quality: -100 > kern.timecounter.smp_tsc: 0 > kern.threads.virtual_cpu: 2 > kern.threads.max_threads_hits: 0 > kern.threads.max_threads_per_proc: 1500 > kern.threads.umtx_max_spins: 3000 > kern.threads.umtx_dflt_spins: 0 > kern.ccpu: 1948 > kern.sched.runq_fuzz: 1 > kern.sched.preemption: 1 > kern.sched.ipiwakeup.htt2: 0 > kern.sched.ipiwakeup.onecpu: 0 > kern.sched.ipiwakeup.useloop: 0 > kern.sched.ipiwakeup.usemask: 1 > kern.sched.ipiwakeup.delivered: 1796942 > kern.sched.ipiwakeup.requested: 1796941 > kern.sched.ipiwakeup.enabled: 1 > kern.sched.quantum: 100000 > kern.sched.name: 4BSD > kern.devstat.version: 6 > kern.devstat.generation: 177 > kern.devstat.numdevs: 2 > kern.kobj_methodcount: 105 > kern.log_wakeups_per_second: 5 > kern.msgbuf_clear: 0 > kern.msgbuf: > kern.always_console_output: 0 > kern.log_console_output: 1 > kern.smp.forward_roundrobin_enabled: 1 > kern.smp.forward_signal_enabled: 1 > kern.smp.cpus: 2 > kern.smp.disabled: 0 > kern.smp.active: 1 > kern.smp.maxcpus: 16 > kern.nselcoll: 0 > kern.tty_nout: 198594 > kern.tty_nin: 1711 > kern.drainwait: 300 > kern.constty_wakeups_per_second: 5 > kern.consmsgbuf_size: 8192 > kern.consmute: 0 > kern.console: consolectl,/consolectl, > kern.pts.max: 1000 > kern.pts.enable: 0 > kern.minvnodes: 25000 > kern.metadelay: 28 > kern.dirdelay: 29 > kern.filedelay: 30 > kern.chroot_allow_open_directories: 1 > kern.random.yarrow.gengateinterval: 10 > kern.random.yarrow.bins: 10 > kern.random.yarrow.fastthresh: 192 > kern.random.yarrow.slowthresh: 256 > kern.random.yarrow.slowoverthresh: 2 > kern.random.sys.seeded: 1 > kern.random.sys.harvest.ethernet: 1 > kern.random.sys.harvest.point_to_point: 1 > kern.random.sys.harvest.interrupt: 1 > kern.random.sys.harvest.swi: 0 > > I see both daemons use CPU0 most of the time, and the other one is =20 > idling. > > last pid: 3138; load averages: 0.70, 0.56, 0.70 > up 0+15:20:36 17:29:46 > 34 processes: 2 running, 32 sleeping > CPU states: 48.9% user, 0.0% nice, 1.7% system, 0.0% interrupt, =20 > 49.4% idle > Mem: 711M Active, 420M Inact, 183M Wired, 32K Cache, 112M Buf, 685M =20= > Free > Swap: 2048M Total, 2048M Free > > PID USERNAME THR PRI NICE SIZE RES STATE C TIME WCPU =20 > COMMAND > 3135 services 3 96 0 29716K 27432K select 0 0:27 60.75% =20 > services > 3106 mysql 14 96 0 637M 628M ucond 0 3:42 33.35% =20 > mysqld > > > last pid: 3142; load averages: 0.83, 0.61, 0.71 > up 0+15:21:13 17:30:23 > 34 processes: 2 running, 32 sleeping > CPU states: 47.2% user, 0.0% nice, 4.9% system, 0.2% interrupt, =20 > 47.7% idle > Mem: 711M Active, 420M Inact, 183M Wired, 32K Cache, 112M Buf, 684M =20= > Free > Swap: 2048M Total, 2048M Free > > PID USERNAME THR PRI NICE SIZE RES STATE C TIME CPU =20 > COMMAND > 3135 services 3 96 0 29716K 27668K select 0 0:55 72.61% =20 > services > 3106 mysql 14 96 0 637M 628M ucond 0 3:52 24.66% =20 > mysqld > > Both of them using libthr as well. > > Now my question is, why they don't use 100% of both COREs while > syncing to 4k users? > > Here is my my.cnf > > [mysqld] > thread_concurrency=3D100 > max_connections=3D5000 > wait_timeout=3D300 > max_allowed_packet=3D32M > key_buffer=3D512M > read_buffer_size=3D3M > sort_buffer_size=3D9M > join_buffer_size=3D3M > myisam_sort_buffer_size=3D100M > read_rnd_buffer_size=3D5M > query_cache_limit=3D1M > query_cache_size=3D64M > query_cache_type=3D1 > thread_cache_size=3D256 > table_cache=3D2048 > max_tmp_tables=3D1024 > tmp_table_size=3D512M > safe-show-database > skip-networking > socket=3D/tmp/mysql.sock > > [client] > socket=3D/tmp/mysql.sock > > The total database size is less than 60 MBs. > > mysqladmin status > Uptime: 878 Threads: 2 Questions: 225769 Slow queries: 0 Opens: 31 > Flush tables: 1 Open tables: 25 Queries per second avg: 257.140 > > > --=20 > Regards, > > -Abdullah Ibn Hamad Al-Marri > Arab Portal > http://www.WeArab.Net/ > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-=20 > unsubscribe@freebsd.org"