Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Jun 2007 00:12:57 -0700 (PDT)
From:      Jeff Roberson <jroberson@chesapeake.net>
To:        Alexey Tarasov <master@preved.cn>
Cc:        current@freebsd.org, Abdullah Ibn Hamad Al-Marri <almarrie@gmail.com>
Subject:   Re: Intel C2D COREs not used equally in FreeBSD 7.0-CURRENT i386
Message-ID:  <20070605001204.M606@10.0.0.1>
In-Reply-To: <34AE885F-1525-402E-84DA-B1F9E51F4B52@preved.cn>
References:  <499c70c0706041042w7c5c70dbh382e0674dac90bb9@mail.gmail.com> <34AE885F-1525-402E-84DA-B1F9E51F4B52@preved.cn>

next in thread | previous in thread | raw e-mail | index | archive | help
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--0-1753755805-1181027577=:606
Content-Type: TEXT/PLAIN; charset=KOI8-R; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE



On Mon, 4 Jun 2007, Alexey Tarasov wrote:

> Hi.
>
>> options         SCHED_4BSD              # 4BSD scheduler
>
> Try to use SCHED_ULE or SCHED_CORE.

CORE is no longer supported and has been removed from the tree.  If you=20
would like to try something new you can cvsup to sources from tonight and=
=20
apply this patch:

http://people.freebsd.org/~jeff/schedsmp.diff

Then use options SCHED_SMP, which is a ULE variant.  Please report back=20
your findings if you do try this.  However, it only works on amd64.

Thanks,
Jeff

>
> ::[ | | | | ]::
> Alexey Tarasov
> master@preved.cn
>
>
> 04.06.2007, =D7 21:42, Abdullah Ibn Hamad Al-Marri =D0=C9=D3=C1=CC(=C1):
>
>> Hello,
>>=20
>> 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.
>>=20
>> FreeBSD 7.0-CURRENT #4: Sun Jun  3 22:56:52 GMT 2007 i386
>>=20
>> Here is my kernel config
>>=20
>> cpu             I686_CPU
>> ident           SERVICES
>>=20
>> options         SCHED_4BSD              # 4BSD scheduler
>> options         PREEMPTION              # Enable kernel thread preemptio=
n
>> options         INET                    # InterNETworking
>> options         FFS                     # Berkeley Fast Filesystem
>> options         SOFTUPDATES             # Enable FFS soft updates suppor=
t
>> options         UFS_ACL                 # Support for access control lis=
ts
>> options         UFS_DIRHASH             # Improve performance on big=20
>> 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 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 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 instead of=
=20
>> IPI
>> options         SC_DISABLE_REBOOT               # Disable reboot key=20
>> sequence
>>=20
>> # To make an SMP kernel, the next two lines are needed
>> options         SMP                     # Symmetric MultiProcessor Kerne=
l
>> device          apic                    # I/O APIC
>>=20
>> device          acpi                    # Compile acpi in statically
>>=20
>> # Bus support.
>> device          eisa
>> device          pci
>>=20
>> # Bus support.
>> device          eisa
>> device          pci
>>=20
>> # ATA and ATAPI devices
>> device          ata
>> device          atadisk         # ATA disk drives
>> options         ATA_STATIC_ID   # Static device numbering
>>=20
>> # 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
>>=20
>> # syscons is the default console driver, resembling an SCO console
>> device          sc
>>=20
>> # PCI Ethernet NICs that use the common MII bus controller code.
>> # NOTE: Be sure to keep the 'device miibus' line in order to use these=
=20
>> NICs!
>> device          miibus          # MII bus support
>> device          sk              # SysKonnect SK-984x & SK-982x gigabit=
=20
>> Ethernet
>>=20
>> # Pseudo devices.
>> device          loop            # Network loopback
>> device          random          # Entropy device
>> device          ether           # Ethernet support
>> device          pty             # Pseudo-ttys (telnet etc)
>> device          snp             # Snoop Device
>>=20
>> # 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
>>=20
>> Here is the sysctl of kern
>>=20
>> 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(-10000=
00)
>> 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
>>=20
>> I see both daemons use CPU0 most of the time, and the other one is idlin=
g.
>>=20
>> 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, 49.4%=
=20
>> idle
>> Mem: 711M Active, 420M Inact, 183M Wired, 32K Cache, 112M Buf, 685M Free
>> Swap: 2048M Total, 2048M Free
>>=20
>> PID USERNAME  THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
>> 3135 services    3  96    0 29716K 27432K select 0   0:27 60.75% service=
s
>> 3106 mysql      14  96    0   637M   628M ucond  0   3:42 33.35% mysqld
>>=20
>>=20
>> 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, 47.7%=
=20
>> idle
>> Mem: 711M Active, 420M Inact, 183M Wired, 32K Cache, 112M Buf, 684M Free
>> Swap: 2048M Total, 2048M Free
>>=20
>> PID USERNAME  THR PRI NICE   SIZE    RES STATE  C   TIME    CPU COMMAND
>> 3135 services    3  96    0 29716K 27668K select 0   0:55 72.61% service=
s
>> 3106 mysql      14  96    0   637M   628M ucond  0   3:52 24.66% mysqld
>>=20
>> Both of them using libthr as well.
>>=20
>> Now my question is, why they don't use 100% of both COREs while
>> syncing to 4k users?
>>=20
>> Here is my my.cnf
>>=20
>> [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
>>=20
>> [client]
>> socket=3D/tmp/mysql.sock
>>=20
>> The total database size is less than 60 MBs.
>>=20
>> 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
>>=20
>> --=20
>> Regards,
>>=20
>> -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-unsubscribe@freebsd.or=
g"
>
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org=
"
--0-1753755805-1181027577=:606--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070605001204.M606>