トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS


チューニング

  • メモリオーバーコミット(Kernel 2.6 uppper)
    メモリが逼迫した状況でも、memory overcommit によるプロセスの突然死を
    起こしたくな い状況では、/proc/sys/vm/overcommit_memory を "2" にし、
    かつ overcommit_ratio を調整して "malloc_limit"値 が物理メモリ量を
    超えないようにすれば良い

    malloc_limit[MB]= swap領域のサイズ[MB] + (物理メモリ量[MB] * overcommit_ratio / 100)

# sysctl -w vm.overcommit_ratio=99
# sysctl -w vm.overcommit_memory=2

Kernel Build

# cp old/.config 
# make dep
# make bzImage
# make modules
# make modules_install

# cat arch/i386/boot/bzImage > /boot/vmlinuz-2.6.20.1
# cp System.map /boot/System.map-2.6.20.1


# cd /boot
# mkinitrd initrd-2.6.20.1 2.6.20.1
# ls -la initrd-2.6.20.1
-rw-r--r-- 1 root root 115561  2月21日 02:20 initrd-2.6.20.1
# mv initrd-2.6.20.1 initrd-2.6.20.1.img
# cd /etc
# cp -ip lilo.conf lilo.conf.yyyymmddnn
# vi lilo.conf 
# /sbin/lilo

Warning:  LINEAR is deprecated in favor of LBA32:  LINEAR specifies 24-bit
  disk addresses below the 1024 cylinder limit; LBA32 specifies 32-bit disk
  addresses not subject to cylinder limits on systems with EDD bios extensions;
  use LINEAR only if you are aware of its limitations.

Added linux
Added linux2619 *
Added linux2620

# rm System.map
# ln -fs System.map-2.6.20.1 System.map
# cat lilo.conf
prompt
timeout=20
default=linux2619
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
linear 

image=/boot/vmlinuz-2.6.16-0vl60
        label=linux
        initrd=/boot/initrd-2.6.16-0vl60.img
        read-only
        append="root=LABEL=/"

image=/boot/vmlinuz-2.6.19.1
        label=linux2619
        initrd=/boot/initrd-2.6.19.1.img
        read-only
        append="root=LABEL=/"

image=/boot/vmlinuz-2.6.20.1
        label=linux2620
        initrd=/boot/initrd-2.6.20.1.img
        read-only
        append="root=LABEL=/"

インテル® PRO/1000 シリーズアダプター

http://support.intel.co.jp/jp/support/network/adapter/1000/linux_readme.htm

  • ジャンボフレーム(MTUサイズの増加)
    通常、EtherのMTUサイズは1500Byteであるが、gigabit ether netwoarkにおいてはMTUサイズを増加させることでパフォーマンス向上を図ることができる。
    手動でのMTUサイズ変更(mtuサイズを9014byteに変更する場合)
    # /sbin/ifconfig eth0 mtu 9014 up
    また、/etc/sysconfig/network-script/ifcfh-eth0に記述ることで対応が可能である。
    追加する設定値(mtuサイズを9014byterに変更する場合)
    MTU=9014

MTUサイズはifconfigコマンドで確認できる。

# /sbin/ifconfig eth0
  • ネゴシエーション設定
    リンクスピードを固定化する場合などの設定はモジュールのオプションで行う。

    Duplex
    値範囲:0-2 (0=auto-negotiate、1=half、2=full)
    デフォルト値:0

    Speed
    値範囲:0、10、100、1000(0=auto-negotiate)

    FlowControl
    値範囲:0-3 (0=none、1=Rx only、2=Tx only、3=Rx&Tx)


    /etc/modprobe.conf例(複数インターフェースを持つ場合はカンマで列挙する)
    eth0はオートネゴシエート、eth1は100Mbps全2重で固定する場合
    eth0 e1000
    eth1 e1000
    options e1000 Speed=0,100 Duplex=0,2


    設定内容はethtoolで確認できる。
    # ethtool eth0

ユーザーID管理のメモ

# chage
Usage: chage [-l] [-m min_days] [-M max_days] [-W warn]
       [-I inactive] [-E expire] [-d last_day] user
# usermod
使用法: usermod [-u ユーザID [-o]] [-g グループ] [-G グループ,...]
               [-d ホーム [-m]] [-s シェル] [-c コメント] [-l 新規ユーザ名]
               [-f 無効日数] [-e 期限切れ日 ] [-p パスワード] [-L|-U] ユーザ名
  • /etc/shadowファイルのフォーマット
    username:passwd:last:may:must:warn:expire:disable:reserved
    usernamepasswdlastmaymustwarnexpiredisablereserved
    ユーザ名エンコードされたパスワード1970年1月1日から、パスワードが最後に更新された日までの日数何日前にパスワードが変更されたと思われるかパスワードを変更しなければならない期限パスワードの期限切れの何日前にユーザに警告するかパスワード期限切れの何日後にアカウントを抹消するか1970年1月1日から、アカウントが抹消された日までの日数予約フィールド
  • ロック
    • 状況表示
      # faillog -u username
    • ロックの解除
      # faillog -r username

3CFE575CTを100Mbps-Full Duplexにする方法

3COMのCardBus? NICのリンクアップスピードを変更する方法

[root@misago /root]# mii-diag eth1 -F 100baseTx-FD~
Setting the speed to "fixed", Control register 2100.~
Basic registers of MII PHY #0:  2100 780d 0300 e54b 01e1 0000 0000 0000.~
 Basic mode control register 0x2100: Auto-negotiation disabled, with~
 Speed fixed at 100 mbps, full-duplex.~
 You have link beat, and everything is working OK.~
 Link partner information is not exchanged when in fixed speed mode.~
   End of basic transceiver information.

Channel Bonding

http://mikilab.doshisha.ac.jp/dia/research/person/atsushi/bonding1.html

VineLinux VersionUp?

[root@inasa apt]# apt-get update 
取得:1 http://updates.vinelinux.org 4.1/i386 release [2254B]
2254B を 0s 秒で取得しました (15.4kB/s) 
取得:1 http://updates.vinelinux.org 4.1/i386/main pkglist [286kB]
取得:2 http://updates.vinelinux.org 4.1/i386/main release [158B]
取得:3 http://updates.vinelinux.org 4.1/i386/plus pkglist [484kB]
取得:4 http://updates.vinelinux.org 4.1/i386/plus release [166B]
取得:5 http://updates.vinelinux.org 4.1/i386/updates pkglist [47.0kB]
取得:6 http://updates.vinelinux.org 4.1/i386/updates release [169B]
取得:7 http://updates.vinelinux.org 4.1/i386/nonfree pkglist [5713B]
取得:8 http://updates.vinelinux.org 4.1/i386/nonfree release [169B]
取得:9 http://updates.vinelinux.org 4.1/i386/main srclist [121kB]
取得:10 http://updates.vinelinux.org 4.1/i386/plus srclist [199kB]
取得:11 http://updates.vinelinux.org 4.1/i386/updates srclist [10.4kB]
取得:12 http://updates.vinelinux.org 4.1/i386/nonfree srclist [10.1kB]
1164kB を 2s 秒で取得しました (389kB/s)
セグメンテーション違反ですでいます... 0%
[root@inasa apt]# df -k
ファイルシステム     1K-ブロック  使用        空き 使用% マウント位置
/dev/hda2               295555    205949     74345  74% /
/dev/hda1               295561     19266    261035   7% /boot
none                    159396         0    159396   0% /dev/shm
/dev/hda9              2063504   1293848    664836  67% /home
/dev/hda5              5162796   2683200   2217340  55% /usr
/dev/hda8              2063504    433332   1525352  23% /var
/dev/hda7              5162796   2917248   1983292  60% /usr/local
/dev/hda6              5162796    145496   4755044   3% /opt
/dev/hda11           120001836  86234892  33766944  72% /data
/dev/hda12            92941156  34605428  58335728  38% /data/itune
[root@inasa apt]# apt-get dist-upgrade
セグメンテーション違反ですでいます... 0%
[root@inasa apt]# mv /var/cache/apt/pkgcache.bin /var/cache/apt/pkgcache.bin.bak
[root@inasa apt]# mv /var/cache/apt/srcpkgcache.bin  /var/cache/apt/srcpkgcache.bin.bak

Counter: 8259, today: 2, yesterday: 0