flagflag  If you want to see English page, please click "English" Button at Left.
5: 2013-03-08 (金) 02:40:35 s09081 ソース 6: 2013-03-08 (金) 05:42:35 s09081 ソース
Line 225: Line 225:
英語だけどどうせコマンドばかりなので特に訳す必要はない. 英語だけどどうせコマンドばかりなので特に訳す必要はない.
しかしまとめておきたいのでここに記載する. しかしまとめておきたいのでここに記載する.
 +**初期設定 [#wf690c9b]
 + emerge squashfs-tools cdrtools
 + export LIVECD=~/livecd
 + export TARGET=${LIVECD}/target
 + export TARGET_SOURCE=${TARGET}/files/source
 + export SOURCE=${LIVECD}/source
 + mkdir -p ${LIVECD}/source
 + cd ${LIVECD}
 + wget stage portage
 + cd ${LIVECD}/source
 + tar -xvjpf ${LIVECD}/stage3-*.tar.bz2
 + tar -xvjpf ${LIVECD}/portage-latest.tar.bz2 -C usr
 +**基本システムのインストール開始 [#n4776801]
 + cd ${LIVECD}/source
 + mkdir proc dev sys
 + mount --bind /proc proc
 + mount --bind /dev dev
 + mount --bind /sys sys
 + mkdir -p usr/portage/distfiles
 + mount --bind /usr/portage/distfiles usr/portage/distfiles
 + cp /etc/resolv.conf ${LIVECD}/source/etc
 + cp /etc/make.conf ${LIVECD}/source/etc
 + chroot . /bin/bash --login
 +  # now we are in the chrooted environment
 + env-update && source /etc/profile
 + passwd
 +
 + nano /etc/make.conf
 +   CFLAGS="-march=pentium4 -O2 -fomit-frame-pointer -pipe"
 +   CXXFLAGS="${CFLAGS}"
 +   CHOST="i686-pc-linux-gnu"
 +   MAKEOPTS="-j96"
 +   GENTOO_MIRRORS="ftp://ftp.iij.ad.jp/pub/linux/gentoo/ http://ftp.iij.ad.jp/pub/linux/gentoo/ http://ftp.jaist.ac.jp/pub/Linux/Gentoo/​ ftp://ftp.jaist.ac.jp/pub/Linux/Gentoo/"
 +   SYNC="rsync://rsync3.jp.gentoo.org/gentoo-port​age"
 +   USE="-X -doc"
 + emerge -1 gcc
 + emerge -1 glibc
 + emerge -e world --exclude glibc --exclude gcc
 + ln -sf /usr/share/zoneinfo/file> /etc/localtime
 + emerge memtest86+ localepurge genkernel gentoolkit dmraid livecd-tools vim
 + emerge <required packages, as you like, e.g. logger udev eix gentoolkit>
 + rc-update add <applications that need to be started upon system start-up> default
 + emerge scripts
 + emerge mingetty
 +
 + vi /etc/fstab
 +     /dev/loop0              /              squashfs        defaults            0 0
 +     none                    /proc          proc            defaults            0 0
 +     none                    /dev/shm        tmpfs          defaults            0 0
 +
 +**Kernel [#m47a2577]
 + emerge gentoo-sources genkernel
 + cd /usr/src/linux
 + [make allmodconfig] OR genkernel --menuconfig all してSaveしてCTL+C(.configを作っちゃえ)
 +必要最低限な設定
 + General setup  --->
 +   <*> Initial RAM filesystem and RAM disk (initramfs/initrd) support
 + File systems  --->
 +   <*> Ext3 journalling file system support
 +   <*> Reiserfs support
 +   <*> JFS filesystem support
 +   <*> XFS filesystem support
 +   Miscellaneous filesystems  --->
 +     <*> SquashFS 4.0 - Squashed file system support
 +   CD-ROM/DVD Filesystems  --->
 +     <*> ISO 9660 CDROM file system support
 +   Pseudo filesystems  --->
 +     [*] Virtual memory file system support (former shm fs)
 + Device Drivers  --->
 +   Block devices  --->
 +     <*> Loopback device support
 +     <*> RAM block device support
 +     (16)  Default number of RAM disks
 +     (9000) Default RAM disk size (kbytes)
 +   ATA/ATAPI/MFM/RLL support  --->
 +     <*>  Include IDE/ATAPI CDROM support
 +
 + genkernel initramfs
 + genkernel all --no-splash --no-clean --menuconfig
 + cp /boot/initramfs-genkernel-x86-2.6.37-gen​too-r4 /boot/initrd
 + cp /boot/kernel-genkernel-x86-2.6.37-gentoo​-r4 /boot/vmlinuz
 +***補足設定 [#b6a0203c]
 + emerge app-admin/localepurge
 +
 + vi  /etc/locale.nopurge
 +  MANDELETE
 +  SHOWFREEDSPACE
 +  VERBOSE
 +  en
 +  en_US.UTF-8
 +
 + localepurge
 + makewhatis -u
 + find / -type l ! -xtype f ! -xtype d -ok rm -f {} \;
 + find / -type f -xdev -name ".keep" -print -exec rm {} \;
 + emerge mlocate
 + cat /proc/mounts > /etc/mtab
 + updatedb
 +***grub [#f4cfd800]
 + emerge grub
 +
 + vi /boot/grub/menu.lst
 +  default 0
 +  timeout 7
 +  splashimage=/boot/grub/splash.xpm.gz
 +
 +  title=LiveCD
 +         kernel /boot/vmlinuz real_root=/dev/loop0 looptype=squashfs loop=/livecd.squashfs vga=ask initrd udev nodevfs cdroot dodmraid
 +         initrd /boot/initrd
 +
 +  title=LiveCD NO-FB
 +         kernel /boot/vmlinuz real_root=/dev/loop0 looptype=squashfs loop=/livecd.squashfs initrd udev nodevfs cdroot dodmraid
 +         initrd /boot/initrd
 +
 +  title=Memtest86+
 +         kernel /boot/memtest86plus/memtest.bin
 +
 + rm /boot/grub/menu.lst
 + cp /boot/grub/grub.conf /boot/grub/menu.lst
 +**最終処理 [#s81dc70d]
 + exit
 + # Now outside the chroot, put the environment back
 + cd ${LIVECD}/source
 + umount sys proc dev usr/portage/distfiles
 + env-update
 + source /etc/profile
 + mkdir -p ${LIVECD}/target/files/source
 + rsync --delete-after --archive --hard-links --quiet ${LIVECD}/source/boot ${LIVECD}/target/
 + rsync --delete-after --archive --hard-links ${LIVECD}/source/ ${LIVECD}/target/files/source
 + cd ${TARGET_SOURCE}
 + rm -rf var/tmp/*
 + rm -rf var/run/*
 + rm -rf var/lock/*
 + rm -rf var/cache/*
 + mkdir -p var/lock/subsys
 + mkdir -p var/cache/edb/deb
 + mkdir var/cache/hald
 + rm -rf var/db
 + rm -rf tmp/*
 + rm -f etc/mtab
 + touch etc/mtab
 + rm -rf usr/portage
 + rm -rf etc/portage
 + rm -rf usr/share/doc
 + rm root/.bash_history
 + rm root/.zcompdump
 + rm -rf var/log
 + mkdir var/log
 + rm etc/make.profile
 + rm -rf root/.ccache
 + rm -rf root/.mc
 + rm -rf initrd
 + rm before-build
 +**squashfsとisoの生成 [#rc7233f6]
 + cd ${LIVECD}/target/files
 + rm -f ${LIVECD}/target/livecd.squashfs
 + mksquashfs source ${LIVECD}/target/livecd.squashfs
 + touch ${LIVECD}/target/livecd
 + cd ${LIVECD}
 + mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table \
 + -iso-level 4 -hide-rr-moved -c boot.catalog \
 + -o ${LIVECD}/livecd.iso -x files ${LIVECD}/target
 +
 +*余談 [#he1db713]
 +UnixBenchを同じ環境のCentOS6とGentooで比べてみた.~
 +様々な部分で最適化を行っているのでGentooなのが有利なのは目に見えているがその差を理解してくれない方がいるので参考にどうぞ.~
 +
 +**Gentoo [#y3b4fc66]
 + =======================================​=================================
 +   BYTE UNIX Benchmarks (Version 5.1.3)
 +
 +   System: gentoo-star-light: GNU/Linux
 +   OS: GNU/Linux -- 3.7.10-gentoo -- #1 SMP Thu Mar 7 16:43:32 JST 2013
 +   Machine: x86_64 (GenuineIntel)
 +   Language: en_US.utf8 (charmap="ANSI_X3.4-1968", collate="ANSI_X3.4-1968")
 +   CPU 0: Intel(R) Xeon(TM) CPU 3.60GHz (7200.4 bogomips)
 +         Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
 +   CPU 1: Intel(R) Xeon(TM) CPU 3.60GHz (7200.5 bogomips)
 +         Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
 +   CPU 2: Intel(R) Xeon(TM) CPU 3.60GHz (7200.4 bogomips)
 +         Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
 +   CPU 3: Intel(R) Xeon(TM) CPU 3.60GHz (7200.5 bogomips)
 +         Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET
 +   03:42:03 up  8:46,  3 users,  load average: 0.16, 0.07, 0.06; runlevel 3
 +
 +***1Coreスコア [#yb03dfa1]
 +| Dhrystone 2 using register variables|          11155981.0 lps|
 +| Double-Precision Whetstone|                      2419.3 MWIPS|
 +| Execl Throughput|                                    2391.9 lps|
 +| File Copy 1024 bufsize 2000 maxblocks|        342485.7 KBps|
 +| File Copy 256 bufsize 500 maxblocks|          110770.1 KBps|
 +| File Copy 4096 bufsize 8000 maxblocks|        679330.9 KBps|
 +| Pipe Throughput|                                      670167.7 lps|
 +| Pipe-based Context Switching|                    64684.7 lps|
 +| Process Creation|                                      5676.1 lps|
 +| Shell Scripts (1 concurrent)|                      3790.4 lpm|
 +| Shell Scripts (8 concurrent)|                      957.7 lpm|
 +| System Call Overhead|                              1052794.7 lps|
 +
 +***4Coreスコア [#k1fe0ee9]
 +| Dhrystone 2 using register variables|      22177107.3 lps|
 +| Double-Precision Whetstone|                      4935.4 MWIPS|
 +| Execl Throughput|                                    5283.2 lps|
 +| File Copy 1024 bufsize 2000 maxblocks|        163593.1 KBps|
 +| File Copy 256 bufsize 500 maxblocks|          58558.8 KBps|
 +| File Copy 4096 bufsize 8000 maxblocks|        472802.1 KBps|
 +| Pipe Throughput|                                      1512293.4 lps|
 +| Pipe-based Context Switching|                    192500.9 lps|
 +| Process Creation|                                    14334.5 lps|
 +| Shell Scripts (1 concurrent)|                      7276.2 lpm|
 +| Shell Scripts (8 concurrent)|                      976.5 lpm|
 +| System Call Overhead|                              2883056.5 lps|
 +
 +**CentOS6 [#cc077f11]
 + =======================================​=================================
 +   BYTE UNIX Benchmarks (Version 5.1.3)
 +
 +   System: andromeda: GNU/Linux
 +   OS: GNU/Linux -- 2.6.32-279.14.1.el6.x86_64 -- #1 SMP Tue Nov 6 23:43:09 UTC 2012
 +   Machine: x86_64 (x86_64)
 +   Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8")
 +   CPU 0: Intel(R) Xeon(TM) CPU 3.60GHz (7200.2 bogomips)
 +         Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET
 +   CPU 1: Intel(R) Xeon(TM) CPU 3.60GHz (7199.0 bogomips)
 +         Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET
 +   CPU 2: Intel(R) Xeon(TM) CPU 3.60GHz (7200.2 bogomips)
 +         Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET
 +   CPU 3: Intel(R) Xeon(TM) CPU 3.60GHz (7199.0 bogomips)
 +         Hyper-Threading, x86-64, MMX, Physical Address Ext, SYSCALL/SYSRET
 +   03:04:48 up 52 days,  8:39,  1 user,  load average: 1.07, 1.02, 1.00; runlevel 3
 +
 +***1Core [#b06dcfc2]
 +| Dhrystone 2 using register variables|      10561349.1 lps|
 +| Double-Precision Whetstone|                    1883.7 MWIPS|
 +| Execl Throughput|                              2385.3 lps|
 +| File Copy 1024 bufsize 2000 maxblocks|        370558.2 KBps|
 +| File Copy 256 bufsize 500 maxblocks|          122804.2 KBps|
 +| File Copy 4096 bufsize 8000 maxblocks|        680746.1 KBps|
 +| Pipe Throughput|                              907149.0 lps|
 +| Pipe-based Context Switching|                  61452.0 lps|
 +| Process Creation|                              5936.9 lps|
 +| Shell Scripts (1 concurrent)|                  3217.5 lpm|
 +| Shell Scripts (8 concurrent)|                    704.0 lpm|
 +| System Call Overhead|                        1034585.9 lps|
 +
 +***4Core [#db090e7b]
 +| Dhrystone 2 using register variables|      18700298.7 lps|
 +| Double-Precision Whetstone|                    5269.4 MWIPS|
 +| Execl Throughput|                              4205.6 lps|
 +| File Copy 1024 bufsize 2000 maxblocks|        274687.3 KBps|
 +| File Copy 256 bufsize 500 maxblocks|          81241.3 KBps|
 +| File Copy 4096 bufsize 8000 maxblocks|        659998.0 KBps|
 +| Pipe Throughput|                            1809128.8 lps|
 +| Pipe-based Context Switching|                186382.6 lps|
 +| Process Creation|                              9241.7 lps|
 +| Shell Scripts (1 concurrent)|                  5203.4 lpm|
 +| Shell Scripts (8 concurrent)|                    800.2 lpm|
 +| System Call Overhead|                        2366560.0 lps|
 +
 +**比較 [#o8ebfcae]
 +| 項目|スコア(CentOS)|スコア(Gentoo)|勝敗|
 +| Dhrystone 2 using register variable|          18700298.7 lps|  22177107.3 lps|  gentoo|
 +| Double-Precision Whetstone|                  5269.4 MWIPS|    4935.4 MWIPS|    centos|
 +| Execl Throughput|                            4205.6 lps|      5283.2 lps|      gentoo|
 +| File Copy 1024 bufsize 2000 maxblocks|        274687.3 KBps|    163593.1 KBps|  centos|
 +| File Copy 256 bufsize 500 maxblocks|          81241.3 KBps|    58558.8 KBps|    centos|
 +| File Copy 4096 bufsize 8000 maxblocks|        659998.0 KBps|    472802.1 KBps|  centos|
 +| Pipe Throughput|                              1809128.8 lps|    1512293.4 lps|  centos|
 +| Pipe-based Context Switching|                186382.6 lps|    192500.9 lps|    gentoo|
 +| Process Creation|                            9241.7 lps|      14334.5 lps|    gentoo|
 +| Shell Scripts (1 concurrent)|                5203.4 lpm|      7276.2 lpm|      gentoo|
 +| Shell Scripts (8 concurrent)|                800.2 lpm|        976.5 lpm|      gentoo|
 +| System Call Overhead|                        2366560.0 lps|    2883056.5 lps|  gentoo|
 +これを誤差と考えるかどうかは人次第かと思う.
 +Gentooが適当なKernelの構築なのでDiskの速度に問題がある感じがするので今後改善すべきか?


トップ   新規 ページ一覧 単語検索 最終更新   ヘルプ   最終更新のRSS 1.0 最終更新のRSS 2.0 最終更新のRSS Atom

サイト内 検索

ログイン

ユーザー名:

パスワード:


パスワード紛失
新規登録

サブ メニュー

ミニカレンダー

前月2024年 5月翌月
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
<今日>

オンライン状況

85 人のユーザが現在オンラインです。 (15 人のユーザが xpwiki を参照しています。)

登録ユーザ: 0
ゲスト: 85

もっと...

アクセスカウンタ

今日 : 8043804380438043
昨日 : 1753317533175331753317533
総計 : 2347118623471186234711862347118623471186234711862347118623471186
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com