ããå¹´æ«ã§ããä»å¹´ã®ISUCONã§ã¯pixivããã®ç¤¾å ISUCONã§ç·´ç¿ããã¦ããã ãã¾ããã
ãã®æã«æ°ã«ãªã£ããã¨ãããã¾ãã¦ãã¤ã³ã¹ã¿ã³ã¹ã¿ã¤ããc4.largeãªã®ã«ã¡ã¢ãªã1Gãããªãã¦ããªãã§ããªã¼ã¨ã
$ free -m total used free shared buffers cached Mem: 998 236 762 12 11 105 -/+ buffers/cache: 119 879 Swap: 0 0 0 $ cat /proc/meminfo MemTotal: 1022972 kB
c4.largeã®ã¡ã¢ãªã¯3.75GBã®ã¯ãã§ããã1Gããèªèããã¦ãã¾ããã
ã©ããã§å¶éãã¦ããã®ã ãããã©ã»ã»ã»OSãèªèãã¦ããªããOSãèµ·åããåã«å¶éãã¦ãï¼ãã¼ããã¼ãã¼ï¼ã¨æã£ããããã§ããã
/boot/grub/grub.cfg
ã確èªããã¨ã mem=1G
ã¨ããè¨è¿°ãããã¾ãï¼
linux /boot/vmlinuz-3.16.0-4-amd64 root=UUID=e0f20fc2-3ca6-416b-8907-4050fe6120ab ro mem=1G init=/bin/systemd console=hvc0 console=ttyS0
ãã®è¨å®ãå¤ãã¦ã¿ã¾ãã /boot/grub/grub.cfg
ãç´æ¥å¤æ´ããã®ã§ã¯ãªãã /etc/default/grub
ãç·¨éãã¾ãã
åè GRUB を設定する 〜 GRUB 2 編 - いますぐ実践! Linuxシステム管理 / Vol.202
/etc/default/grub
ã確èªãã¦ã¿ãã¨
$ cat /etc/default/grub | grep GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT="init=/bin/systemd console=hvc0 console=ttyS0" GRUB_CMDLINE_LINUX="mem=1G"
ããã¾ããã¼ã mem=1G
ã¨ããè¨è¿°ãã GRUB_CMDLINE_LINUX
ã«ã¯ã«ã¼ãã«ã®èµ·åãã©ã¡ã¼ã¿ãè¨è¿°ã§ãã¾ããããã«èµ·åãã©ã¡ã¼ã¿ãè¨è¿°ãã¦OSãèªèããã¡ã¢ãªå®¹éãå¶éãã¦ãã¾ããã
GRUB_CMDLINE_LINUX
ãã mem=1G
ã®è¨è¿°ãæ¶ãã¦ã以ä¸ã®ã³ãã³ãå®è¡ãã¾ãã
$ sudo update-grub Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.16.0-4-amd64 Found initrd image: /boot/initrd.img-3.16.0-4-amd64 done
å度 /boot/grub/grub.cfg
ã確èªãã¦ã¿ã㨠mem=1G
ããªããªã£ã¦ãã¾ãã
linux /boot/vmlinuz-3.16.0-4-amd64 root=UUID=e0f20fc2-3ca6-416b-8907-4050fe6120ab ro init=/bin/systemd console=hvc0 console=ttyS0
ã¤ã³ã¹ã¿ã³ã¹ãåèµ·åãã¦ã確èªãã¦ã¿ãã¨
$ free -m total used free shared buffers cached Mem: 3774 245 3529 16 11 109 -/+ buffers/cache: 124 3650 Swap: 0 0 0 $ cat /proc/meminfo MemTotal: 3865596 kB
使ç¨ã§ããã¡ã¢ãªãå¢ãã¾ããï¼