Upgrade to Pro — share decks privately, control downloads, hide ads and more …

新卒インフラエンジニアがピクシブ新社内広告サーバー構築に挑んだ話

 新卒インフラエンジニアがピクシブ新社内広告サーバー構築に挑んだ話

Kaneko Tatsuya

August 29, 2014
Tweet

More Decks by Kaneko Tatsuya

Other Decks in Technology

Transcript

  1. %/4 UZQFUBJM ޿ࠂ഑৴αʔόʔ ؅ཧαʔόʔ .Z42- qVFOUE qVFOUE /(*/9 ը૾ $"$)&

    LTLMPH NFNDBDIFE ޿ࠂσʔλ "QQMJDBUJPO (PMBOH දࣔ਺ ΫϦοΫ਺ 6/*9υϝΠϯιέοτ $JSDVT ޿ࠂσʔλ ܭଌ݁Ռ ϥ΢ϯυϩϏϯ 6/*9υϝΠϯιέοτ ϑΝΠϧσΟεΫϦϓλ
  2. /HJOY$JSDVT(P w ϑϩϯτ͸/HJOYͰड͚Δ w ը૾ΩϟογϡΛ/HJOYଆͰ࣋ͭ w 6/*9υϝΠϯιέοτܦ༝ͰQSPYZ͢Δ w (Pͷαʔόʔ͸ඪ४ग़ྗʹϩάΛग़ྗ w

    .P[JMMB੡ͷϓϩηε؅ཧπʔϧ$JSDVT͕ϗοτσϓϩΠɾϓϩ ηε؂ࢹɾϩάϑΝΠϧԽɾϩάϩʔςʔτͳͲΛ୲౰ w $JSDVT͕ιέοτϑΝΠϧΛ࡞Γɼ(P͸ϑΝΠϧσΟεΫϦϓλ Λ-JTUFO͢Δαʔόʔ
  3. socket TPDLFU࡞੒ ϑΝΠϧ σΟεΫϦϓλ FYFD socket ϑΝΠϧ σΟεΫϦϓλ ϓϩηε؂ࢹ DJSDVT͸ϓϩηε؂ࢹ͚ͩ

    ͰϦΫΤετ͸ײ஌͠ͳ͍ BQQ͸ϑΝΠϧσΟεΫϦϓλΛ -JTUFO͢ΔαʔόʔͰ͋Δඞཁ͕͋Δ αʔόʔىಈ࣌ αʔόʔىಈޙ circus app circus app
  4. circus socket ϑΝΠϧ σΟεΫϦϓλ app_old FYFD app_new ϓϩηε؂ࢹ αʔόʔϦϩʔυ αʔόʔϦϩʔυ

    BQQ@OFX͕ىಈ͢Δ·Ͱ଴ͭ BQQ@OFX͕ىಈͨ͠Β BQQ@PMEΛLJMM͢Δ circus socket ϑΝΠϧ σΟεΫϦϓλ app_old app_new ϓϩηε؂ࢹ LJMM
  5. find / -type f -name "*" -size +1000k -mmin -60

    2> /dev/null \ | xargs sudo pagecache-check.pl 2> /dev/null \ | perl -ne 'if ((m{(.*?)\s.*cached/total_pages=(.*)/.*}) && ($2 > 0)) { print $2, "\t", $1, "\n"; }' \ | sort -nr w ࠓճͷ޿ࠂαʔόʔ͸େྔͷϩάΛग़ྗ͢Δ w DQBOϞδϡʔϧͷ4ZT1BHF$BDIFͰ࢖༻͠ͳ͍ϩάͷϖʔδ ΩϟογϡΛఆظతʹ࡟আ w ༧ظͤ͵ϖʔδΩϟογϡͷ૿Ճ΋4ZT1BHF$BDIFͷग़ྗΛ1FSMͰ ੔ܗͯ͠TPSUͯ͠ϖʔδΩϟογϡΛᷰ͏ϑΝΠϧΛݟ͚ͭͯղܾʂ ϖʔδΩϟογϡΛᷰ͏ϩάΛݟ͚ͭΔ