ロリポップ!で目指す PHPのためのセキュリティと性能要件を 同時に満たすサーバホスティング技術 / loli-next
by
MATSUMOTO Ryosuke
Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
1)1࣮ߦج൫ͷߴԽɾηΩϡϦςΟɾলϝϞϦɾϖύϘ,FSOFM 2016/05/21 PHPΧϯϑΝϨϯεԬ2016 ϩϦϙοϓʂͰࢦ͢ 1)1ͷͨΊͷηΩϡϦςΟͱੑೳཁ݅Λ ಉ࣌ʹຬͨ͢αʔόϗεςΟϯάٕज़ GMOϖύϘגࣜձࣾ γχΞɾϓϦϯγύϧΤϯδχΞ MATSUMOTO, Ryosuke @matsumotory
Slide 2
Slide 2 text
ࣗݾհ (.0ϖύϘגࣜձٕࣾज़ج൫νʔϜ γχΞɾϓϦϯγύϧΤϯδχΞ দຊ྄հ!NBUTVNPUPSZ ઐΠϯλʔωοτͱӡ༻ٕज़ શࣾతʹ৽ٕज़ͷԠ༻৽نݚڀɾ։ൃΛ୲ IUUQSFTFBSDINBUTVNPUPSKQ
Slide 3
Slide 3 text
࣍ ߴूੵϗεςΟϯάαʔϏε 1)1࣮ߦج൫ͷηΩϡϦςΟͱੑೳͷཱ྆ 1)1࣮ߦج൫ͷϝϞϦޮԽ 1)1࣮ߦج൫҆ఆԽͷͨΊʹϖύϘ,FSOFMར༻ ·ͱΊ
Slide 4
Slide 4 text
ߴूੵϗεςΟϯάαʔϏε
Slide 5
Slide 5 text
ϗεςΟϯάαʔϏεͷಛ ࣄۀऀ͓٬༷ͷ8FCίϯςϯπΛ੍ޚͰ͖ͳ͍ ϛυϧΣΞɾ04Ͱ੍ޚ͢Δඞཁ͕͋Δ ڞ༗ͷ߹Ϧιʔε੍ޚηΩϡϦςΟ͕ॏཁ ಛʹੑೳͱ͍͔ʹόϥϯεΛͱΔ͔ ฐࣾͰߴूੵͷڞ༗ϗεςΟϯάʹ߆͍ͬͯΔ
Slide 6
Slide 6 text
ͳͥߴूੵʹͩ͜ΘΔͷ͔
Slide 7
Slide 7 text
No content
Slide 8
Slide 8 text
No content
Slide 9
Slide 9 text
ݸਓ͚αΠτத৺ ສαΠτΛӡӦ ֶੜओ්ͩͬͨΓݸਓ͕झຯͰ͏༻్ ϋʔυΣΞʹͲΕ͚ͩߴूੵͰ͖Δ͔ʹઓ ͱʹ͔҆͘͘ੑೳͷྑ͍ͷΛఏڙ͍ͨ͠ ιϑτΣΞʹΑΔٕज़ྗʹΑͬͯղܾՄೳ
Slide 10
Slide 10 text
8FCαʔόͷΞʔΩςΫνϟ
Slide 11
Slide 11 text
ϓϩηεͱऩ༰αΠτ ϝϞϦ(#Ͱ$16ίΞݸ αΠτΛສ͔ΒສαΠτͰऩ༰ ϓϩηε͕αΠτʹґଘ͠ͳ͍Α͏ͳߏ ෳαΠτڞ༗ͷIUUQEϓϩηε͕ϦΫΤετ͞Εͨϗετ ໊͔ΒಈతʹίϯςϯπΛݕग़ͯ͠ॲཧʢ7JSUVBM)PTU˞ ʣ ˞IUUQIUUQEBQBDIFPSHEPDTDVSSFOUFOWIPTUT
Slide 12
Slide 12 text
IUUQE ߴूੵͷͨΊͷΞʔΩςΫνϟ IUUQEϓϩηεݸºສສϓϩηεʢϢʔβݸผʹϓϩηεىಈʣ IUUQEϓϩηεݸ͙Β͍ͷԾϗετͰશϢʔβڞ༗ Ϣʔβ" IUUQE Ϣʔβ# IUUQE Ϣʔβ$ IUUQE Ϣʔβ" Ϣʔβ# Ϣʔβ$ ޮྑ͘ϦιʔεΛ͑Δ ىಈʹඞཁ ͳϦιʔε ىಈʹඞཁ ͳϦιʔε ىಈʹඞཁ ͳϦιʔε ىಈʹඞཁͳϦιʔε 04 04
Slide 13
Slide 13 text
ߴूੵͷͨΊͷ ΞʔΩςΫνϟͷ՝
Slide 14
Slide 14 text
ηΩϡϦςΟͱੑೳͷཱ྆ ϗεςΟϯάͷಛੑ্Ϣʔβຖʹݫີʹݖݶ ߴूੵڥͷ1)1ͷݖݶͷੑೳͷޮԽ ୯ҰͷBQBDIFݖݶͰىಈ͍ͯ͠ΔϓϩηεͰηΩϡϦ ςΟͱੑೳΛཱ͍͔྆ͭͭ͠ʹదʹݖݶ͢Δ͔
Slide 15
Slide 15 text
ֶज़ݚڀͷΞϓϩʔνͰ ৽ٕज़Λ։ൃɾಋೖ
Slide 16
Slide 16 text
No content
Slide 17
Slide 17 text
1)1࣮ߦج൫ͷ ηΩϡϦςΟͱੑೳͷཱ྆
Slide 18
Slide 18 text
ߴूੵʹ͓͚Δ1)1ͷݖݶ TV&9&$ϦΫΤετຖʹϓϩηεੜഁغ͕ඞཁͰ͍ 'BTU$(*ϢʔβʹԠͯ͡ϓϩηεͱϝϞϦྔ૿Ճ NPE@SVJETVJEੑೳɾηΩϡϦςΟ໘Ͱ͋Γ˞ ݖݶͷͨΊͷίετΛͲ͏Լ͛Δ͔ େنߴूੵͷͨΊͷݖݶΞʔΩςΫνϟݕ౼ ˞দຊ྄հ Ԭ෦णஉ εϨου୯ҐͰݖݶΛߦ͏8FCαʔόͷΞΫηε੍ޚΞʔΩςΫνϟ ిࢠใ௨৴ֶձจࢽ 7PM+# /P QQ 0DU
Slide 19
Slide 19 text
NPE@QSPDFTT@TFDVSJUZ "QBDIFͷεϨου୯ҐͰݖݶΞʔΩςΫνϟ˞ NPE@QIQͳͲͷݖݶΛߴʹߦ͑Δ ϦΫΤετ࣌ͷݖݶͷίετΛݮ ϓϩηεੜഁغ͔ΒεϨουੜഁغ ˞দຊ྄հ Ԭ෦णஉ εϨου୯ҐͰݖݶΛߦ͏8FCαʔόͷΞΫηε੍ޚΞʔΩςΫνϟ ిࢠใ௨৴ֶձจࢽ 7PM+# /P QQ 0DU IUUQTHJUIVCDPNNBUTVNPUPSNPE@QSPDFTT@TFDVSJUZ
Slide 20
Slide 20 text
$(*QSPDFTT PXOFSVTFS $(*QSPDFTT PXOFSSPPU QIQDHJ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WFQPMM@XBJUcHSFQWGVUFYcQFSMBOF QSJOU@JG
Slide 24
Slide 24 text
No content
Slide 25
Slide 25 text
ͦͷଞͷϝϦοτ͋ͬͨ ෛՙ͕େ෯ʹݮʢ1)1ར༻ऀ͕ଟʣ ϩʔυΞϕϨʔδʹͳΔΑ͏ͳΞΫηε͕ҎԼ ࠓ$(*ͱ%40ͷڞଘ͍ͯ͠Δঢ়ଶ %40ઐ༻ʹ͢Εͬͱऩ༰ޮ্͕͕Δ
Slide 26
Slide 26 text
ಋೖલޙͷ$16༻ྔൺֱ ҰͷΞΫηεͲͪΒͷαʔόສʢαʔϏεશମͰेԯʣ $(*ʴTV&9&$ %40ʴNPE@QSPDFTT@TFDVSJUZ ˙TZTUFN ˙VTFS ˙JEMF
Slide 27
Slide 27 text
͞Βʹ҆͘ɺ͞Βʹߴੑೳ
Slide 28
Slide 28 text
1)1࣮ߦج൫ͷϝϞϦޮԽ
Slide 29
Slide 29 text
ϩϦϙοϓʂߴूੵ ͱʹ͔͘ϓϩηεΛઅ͍ͨ͠ ͱʹ͔͘ϝϞϦΛઅ͍ͨ͠ NPE@QIQ݁ߏϝϞϦΛ৯͏ ಛʹϓϩηεͷ13*7"5&ͳϝϞϦઅ͍ͨ͠
Slide 30
Slide 30 text
NFNPSZ@MJNJUʹΑΔ੍ݶ NFNPSZ@MJNJUͰ13*7"5&ϝϞϦ੍ݶͰ͖Δ͕ʜ 1)1࣮ߦޙʹ13*7"5&ϝϞϦ͕ཷ·Δͷ͕ NFNPSZ@MJNJUΛԼ͛Δͱ͓٬༷͕໎ NFNPSZ@MJNJUेʹ͋Δ͕࣮ߦޙʹ͍ͬͯ ͳ͍13*7"5&ϝϞϦΛݮΒ͢ʹͲ͏͢ΕΑ͍͔
Slide 31
Slide 31 text
;&/%@..@4&(@4*;& ϝϞϦϒϩοΫΛׂΓͯΔࡍͷηάϝϯταΠζ ॲཧޙʹϝϞϦ͕ແବʹΔύλʔϯ͕͋Δ ׂͯྔΛνϡʔχϯάͯ͠Βͳ͍Α͏ʹͰ͖Δ ͕݅߹͑େ͖ͳޮՌ͕ಘΒΕΔͣ ίʔυΛݟΔݶΓڥมͰ੍ޚՄೳ
Slide 32
Slide 32 text
No content
Slide 33
Slide 33 text
NPE@QIQىಈ࣌ PID VSZ RSS PRIVATE SHARED[KB] 10280 51188 49824 128 49696 ( 99%) 10281 51188 49824 124 49700 ( 99%) 10282 51188 49824 124 49700 ( 99%) 10283 51188 49824 124 49700 ( 99%) 10284 51188 49824 124 49700 ( 99%) 10285 51188 49824 124 49700 ( 99%) 10286 51188 49824 124 49700 ( 99%) 10287 51188 49824 124 49700 ( 99%) 10288 51188 49824 124 49700 ( 99%) IUUQTHJUIVCDPNIJSPTFTIBSFENFNPSZTJ[F
Slide 34
Slide 34 text
σϑΥϧτʢ81ΞΫηεޙʣ PID VSZ RSS PRIVATE SHARED[KB] 10281 125628 67372 18428 48944 ( 72%) 10282 125628 67368 18400 48968 ( 72%) 10286 125628 67368 18400 48968 ( 72%) 10291 125628 67368 18400 48968 ( 72%) 10293 125628 67368 18400 48968 ( 72%) 10294 125628 67368 18400 48968 ( 72%) 10300 125628 67368 18400 48968 ( 72%) 10301 125628 67368 18400 48968 ( 72%) 10303 125628 67368 18400 48968 ( 72%) 8PSE1SFTTͷॲཧޙͷ13*7"5&ͷϝϞϦ֬อྔ.#
Slide 35
Slide 35 text
νϡʔχϯάޙʢ81ΞΫηεޙʣ PID VSZ RSS PRIVATE SHARED[KB] 20908 129212 55076 6108 48968 ( 88%) 20909 129212 55076 6108 48968 ( 88%) 20910 129212 55076 6108 48968 ( 88%) 20911 129212 55076 6108 48968 ( 88%) 20912 129212 55076 6108 48968 ( 88%) 20913 129212 55076 6108 48968 ( 88%) 20914 129212 55076 6108 48968 ( 88%) 20915 129212 55076 6108 48968 ( 88%) 20916 129212 55076 6108 48968 ( 88%) ϓϩηεͰ13*7"5&Λ.#ݮɺϓϩηεͩͱ(#ͷݮ
Slide 36
Slide 36 text
͓٬༷ͷϝϞϦΛ੍ݶ͢Δ͜ ͱͳ͘1)1ଆͰઅ͕Ͱ͖ͨ
Slide 37
Slide 37 text
1)1࣮ߦج൫҆ఆԽͷͨΊ ϖύϘ,FSOFMར༻
Slide 38
Slide 38 text
1)1͕LFSOFMΛ͑ͨ
Slide 39
Slide 39 text
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND apache 10241 55636314 0.0 0 0 ? R 12:36 21115121:16 [httpd]
Slide 40
Slide 40 text
ϖύϘ,FSOFM ,FSOFMܥͷDHSPVQͰ,FSOFMύχοΫϋϯάසൃ $16ສͷQIQͷLFSOFMεϨου ͷ༷ʹݟ͑Δʣ ࡴͤͳ͍ɺIBMUͰ͖ͳ͍ɺϋʔυϦηοτ͢Δ͔͠ͳ͍ $FOU04ʹ,FSOFMܥϕʔεͷϖύϘ,FSOFMΛಋೖ .BDͰಈ͘,FSOFMͷSQNϏϧυγεςϜ։ൃ IUUQTHJUIVCDPNNBUTVNPUPSLFSOFMCVJMETZTUFNGPSDFOUPT
Slide 41
Slide 41 text
ಛఆͷ1)1͕ͨ͠Γ੬ऑͰ͋ͬͯ ଞϗετʹඃ͕Ͱͳ͍Α͏ʹ͖ͪΜͱ੍ޚ
Slide 42
Slide 42 text
·ͱΊ
Slide 43
Slide 43 text
ͥͻϩϦϙοϓʂͷ1)1Λ ͬͯԼ͍͞ IUUQTMPMJQPQKQ
Slide 44
Slide 44 text
ϖύϘɾͯͳٕज़େձ։࠵ ओʹ8FCαʔϏεاۀʹڵຯͷ͋Δֶੜ͚ ژͱԬͰि࿈ଓͰ։࠵ʢͱʣ ୈҰճ8FCαʔϏεͷج൫ٕज़ ৄ͘͠ҎԼͷ63-Ͱ IUUQEFWFMPQFSIBUFOBTUBGGDPNFOUSZ