Inside Amazon S3, EC2

  • EC2 HOST の CPU 使用率を類推
Host server CPU utilization in Amazon EC2 cloud « Huan Liu's Blog

Xen環境でも i2c で CPU 温度がとれるのね センサーデータの取得方法のリンク

Monitoring your hardware's temperature
Ubuntu 10.04LTS に温度監視機能を追加 (lm-sensors)
muninでCPU温度などをグラフ化 - 某ソフト作者の開発日記

kernel 3.2.0 の場合は linux-image-extra-virtual が必要

ubuntu での設定 SensorInstallHowto

aptitude -y install lm-sensors
sensors-detect
service module-init-tools start

動作確認

sensors

CPU 温度情報がでてきたらOK

coretemp-isa-0000
Adapter: ISA adapter
Core 0:      +45.0°C  (high = +90.0°C, crit = +100.0°C)  

coretemp-isa-0001
Adapter: ISA adapter
Core 0:      +39.0°C  (high = +90.0°C, crit = +100.0°C)  

muninの 設定

cd /etc/munin/plugins
ln -s /usr/share/munin/plugins/sensors_ sensors_temp

/etc/munin/plugin-conf.d/munin-node に

[sensors_*]
user root

を追加

service munin-node restart


  • いろいろ情報が出てきた
去年の BlackHat ネタ
構築には RedHat 社が深く関わっている
instance store は LVM で cow な snapshot
EBS は GNBD
  • m1.small instance のパフォーマンス
数ヶ月動かしてみて、m1.small instance の CPU 性能は足りないと思いました。
(アクセスの多いサイトに mod_deflate 仕込むと pain!)
  • Amazon のシステムの変遷がなんとなく見えるリンク集
  • netmask は 255.255.254.0
/23 か
  • 内部 IP address 逆引きの違いが興味深い
us-east-1b では
domU-XX-XX-XX-XX-XX-XX.compute-1.internal.
で、MAC Address が記述されている。インスタンスが生存中は MAC Address で管理するのが、仮想ハードウェアとしたら、合理的だなと思ったのだが、(もちろん vender code には登録されてないよ ;)
で、us-east-1a では、
ip-XXX-XXX-XXX-XXX.ec2.internal.
と、IP Address が記述されている。
1b と全然ちがうので、びっくり。いろいろ改善しているんだなぁと。
  • m1.small instance の場合
# cat /proc/cpuinfo 
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 65
model name	: Dual-Core AMD Opteron(tm) Processor 2218 HE
stepping	: 3
cpu MHz	: 2599.998
cache size	: 1024 KB
fdiv_bug	: no
hlt_bug	: no
f00f_bug	: no
coma_bug	: no
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu tsc msr pae mce cx8 apic mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow up pni cx16 lahf_lm cmp_legacy svm extapic cr8legacy ts fid vid ttp tm stc
bogomips	: 6502.65
clflush size	: 64
  • 初期状態のシステム設定
Amazon Public AMI ami-5647a33f ec2-public-images/fedora-8-i386-base-v1.08.manifest.xml の場合
# uname -a
Linux domU-XX-XX-XX-XX-XX-XX 2.6.21.7-2.fc8xen #1 SMP Fri Feb 15 12:39:36 EST 2008 i686 athlon i386 GNU/Linux
dmesg は 別ページ
vm.swappiness = 60
fs.file-max = 169203
kernel.threads-max = 54656
kernel.random.poolsize = 4096
kernel.sem = 250	32000	32	128
kernel.msgmni = 16
kernel.shmmax = 33554432
net.ipv4.tcp_rmem = 4096	87380	4194304
net.ipv4.tcp_wmem = 4096	16384	4194304
net.ipv4.tcp_mem = 162624	216832	325248
net.core.rmem_default = 110592
net.core.wmem_default = 110592
net.core.rmem_max = 131071
net.core.wmem_max = 131071
net.ipv4.tcp_max_syn_backlog = 1024
net.ipv4.tcp_max_orphans = 32768
net.ipv4.tcp_fin_timeout = 60
net.ipv4.tcp_tw_reuse = 0
net.ipv4.tcp_tw_recycle = 0
net.ipv4.tcp_keepalive_time = 7200
# ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 27328
max locked memory       (kbytes, -l) 32
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 10240
cpu time               (seconds, -t) unlimited
max user processes              (-u) 27328
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
# ps ax
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:00 init [4]
    2 ?        S      0:00 [migration/0]
    3 ?        SN     0:00 [ksoftirqd/0]
    4 ?        S      0:00 [watchdog/0]
    5 ?        S<     0:00 [events/0]
    6 ?        S<     0:00 [khelper]
    7 ?        S<     0:00 [kthread]
    9 ?        S<     0:00 [xenwatch]
   10 ?        S<     0:00 [xenbus]
   48 ?        S<     0:00 [kblockd/0]
   49 ?        S<     0:00 [cqueue/0]
   54 ?        S<     0:00 [khubd]
   56 ?        S<     0:00 [kseriod]
   76 ?        S      0:00 [pdflush]
   77 ?        S      0:00 [pdflush]
   78 ?        S<     0:00 [kswapd0]
   79 ?        S<     0:00 [aio/0]
  201 ?        S<     0:00 [kpsmoused]
  220 ?        S<     0:00 [kjournald]
  242 ?        S<     0:00 [kauditd]
  267 ?        S<s    0:00 /sbin/udevd -d
  498 ?        S<     0:00 [kmpathd/0]
  504 ?        S<     0:00 [kmirrord]
  522 ?        S<     0:00 [kjournald]
  785 ?        Ss     0:00 /sbin/dhclient -1 -q -lf /var/lib/dhclient/dhclient-eth0.leases -pf /var/run/dhclient-eth0.pid eth0
  850 ?        Sl     0:00 rsyslogd -m 0
  854 ?        Ss     0:00 rklogd -x
  863 ?        Ss     0:00 dbus-daemon --system
  883 ?        Ss     0:00 /usr/sbin/sshd
  891 ?        Ssl    0:00 console-kit-daemon
  921 ?        Ss     0:00 crond
  972 ?        SNs    0:00 anacron -s
 1007 xvc0     Ss+    0:00 /sbin/agetty xvc0 9600 vt100-nav
 1008 ?        Ss     0:00 sshd: root@pts/0 
 1012 pts/0    Ss     0:00 -bash
 1054 pts/0    R+     0:00 ps ax
# mount   
/dev/sda1 on / type ext3 (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda2 on /mnt type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
# runlevel
N 4
# more /etc/hosts
127.0.0.1       localhost.localdomain localhost