2018ǯ03·î20Æü

LVS¤Î¹âÉé²ÙÂкö ¤½¤Î3 ¡Ádrop entry¤Î¥µ¡¼¥Ó¥¹¤Ø¤Î±Æ¶Á¤Ë¤Ä¤¤¤Æ¡Á

¤Ï¤Æ¤Ê¥Ö¥Ã¥¯¥Þ¡¼¥¯¤ËÅÐÏ¿

¤³¤ó¤Ë¤Á¤Ï¡£¥¤¥ó¥Õ¥éôÅö¤Î²¬Â¼¤Ç¤¹¡£
¡ÖLVS¤Î¹âÉé²ÙÂкö ¤½¤Î2 ¡Á¾ã³²¤ÎºÆ¸½¤È¤½¤Î¸¶°ø¡Á¡×¤Îµ­»ö¤Ç¡¢LVS¤ËÈ÷¤ï¤Ã¤Æ¤¤¤ë¹âÉé²ÙÂкöµ¡Ç½¤Ç¤¢¤ëdrop entryµ¡Ç½¤Ë¤Ä¤¤¤Æ¾Ò²ð¤·¤Þ¤·¤¿¡£º£²ó¤Ï¡¢drop entryµ¡Ç½¤¬Í­¸ú¤Ë¤Ê¤Ã¤¿»þ¤Î¥µ¡¼¥Ó¥¹¤Ø¤Î±Æ¶Á¤òÄ´ºº¤·¤¿¤Î¤Ç¾Ò²ð¤·¤Þ¤¹¡£

Á°²ó¤Î¤ª¤µ¤é¤¤

¾Ü¤·¤¯¤ÏÁ°²ó¤Îµ­»ö¤ò¸«¤Æ¤¤¤¿¤À¤­¤¿¤¤¤Î¤Ç¤¹¤¬¡¢´Êñ¤Ë¤Þ¤È¤á¤ë¤È¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£

  • drop entry¤Ï¡¢IPVS¤Î¥¨¥ó¥È¥ê¤ò¥é¥ó¥À¥à¤Ëºï½ü¤¹¤ëµ¡Ç½¡£
    • SYN_RECV¾õÂÖ¤ÈSYNACK¾õÂ֤Υ¨¥ó¥È¥ê¤Ë¤Ä¤¤¤Æ¤Ï¡¢1É䪤­¤ËIPVS¤Î¥³¥Í¥¯¥·¥ç¥ó¥Ï¥Ã¥·¥å¥Æ¡¼¥Ö¥ë¤«¤é¥é¥ó¥À¥à¤ËÁª¤ó¤ÀÈÏ°Ï(Á´ÂΤÎ32ʬ¤Î1)¤ò¥¹¥­¥ã¥ó¤·¡¢¤½¤ÎÃæ¤Î¥¨¥ó¥È¥ê¤òºï½ü¤¹¤ë¡£
    • ESTABLISHED¾õÂ֤Υ¨¥ó¥È¥ê¤Ë¤Ä¤¤¤Æ¤Ï¡¢¡ÖºÇ¸å¤Î¥Ñ¥±¥Ã¥È¤¬ÆϤ¤¤Æ¤«¤é60Éðʾå·Ð²á¡×¤«¤Ä¡ÖºÇ½é¤Î¥Ñ¥±¥Ã¥È¤¬ÆϤ¤¤Æ¤«¤é¤Î¼õ¿®¥Ñ¥±¥Ã¥È¤Î¹ç·×¿ô¤¬8°Ê²¼¡×¤Î¥¨¥ó¥È¥ê¤Î¤ßºï½ü¤ÎÂоݤȤ¹¤ë¡£
  • ¶õ¤­¥á¥â¥ê¤Î¥µ¥¤¥º¤¬ÀßÄꤷ¤¿ïçÃͤò²¼²ó¤Ã¤¿¤È¤­¤Ë¡¢¼«Æ°¤Çdrop entry¤òÍ­¸ú¤Ë¤¹¤ë¤³¤È¤¬²Äǽ¡£
    • ïçÃͤòÂ礭¤¯¤¹¤ì¤Ð¡¢¾¯¤Ê¤¤¥¨¥ó¥È¥ê¿ô¤Ç¤âdrop entry¤¬Í­¸ú¤Ë¤Ê¤ë¤è¤¦¤Ë¤Ê¤êLVS¤ÎÂÑÀ­¤ÏÁý¤¹¤¬¡¢¤½¤ÎʬÀµµ¬¤Î¥µ¡¼¥Ó¥¹ÍøÍѼԤÎÄÌ¿®¤Ë¤â±Æ¶Á¤¬½Ð¤ä¤¹¤¯¤Ê¤ë¡£

Á°²ó¡¢¡Ødrop entryÍ­¸ú»þ¤Ë¤Ï¡¢IPVS¤ò·Ðͳ¤¹¤ë¤É¤ÎÀܳ¤â¥¨¥ó¥È¥êºï½ü¤Î±Æ¶Á¤ò¼õ¤±¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¤¬¡¢¥í¡¼¥É¥Ð¥é¥ó¥µ¤¬Íî¤Á¤Æ¥µ¡¼¥Ó¥¹Ää»ß¤·¤Æ¤·¤Þ¤¦¤è¤ê¤Ï¤º¤Ã¤ÈÎɤ¤¤Î¤Ç¤Ï¤Ê¤¤¤«¡Ù¤ÈÄù¤á¤¯¤¯¤ê¤Þ¤·¤¿¤¬¡¢¼ÂºÝ¤Ë¤É¤ì¤À¤±Àµµ¬¤ÎÄÌ¿®¤Ë±Æ¶Á¤òÍ¿¤¨¤ë¤Î¤«µ¤¤Ë¤Ê¤ê¤Þ¤¹¡£
drop entry¤¬Í­¸ú¤Ë¤Ê¤Ã¤¿»þ¤Î¥µ¡¼¥Ó¥¹¤Ø¤Î±Æ¶Á¤ÎÂ礭¤µ¤â¡¢ïçÃͤò·è¤á¤ë¤¿¤á¤ÎȽÃǺàÎÁ¤È¤·¤ÆÃΤäƤª¤­¤¿¤«¤Ã¤¿¤¿¤á¡¢¸¡¾Ú´Ä¶­¤ÇÄ´ºº¤·¤Æ¤ß¤Þ¤·¤¿¡£

Ä´ºº

¤Þ¤º¡¢ESTABLISHED¾õÂ֤Υ¨¥ó¥È¥ê¤Ë¤Ä¤¤¤Æ¤Ç¤¹¤¬¡¢°ìÈÌŪ¤ÊWeb¥¢¥×¥ê¤ÎÄÌ¿®¤Ç¤Ï¡¢¡ÖºÇ¸å¤Î¥Ñ¥±¥Ã¥È¤¬ÆϤ¤¤Æ¤«¤é60Éðʾå·Ð²á¡×¤«¤Ä¡ÖºÇ½é¤Î¥Ñ¥±¥Ã¥È¤¬ÆϤ¤¤Æ¤«¤é¤Î¼õ¿®¥Ñ¥±¥Ã¥È¤Î¹ç·×¿ô¤¬8°Ê²¼¡×¤È¤Ê¤ë¤è¤¦¤Ê(Àµ¾ï¤Ê)ÄÌ¿®¤Ï̵¤¤¤ÈȽÃǤ·¡¢Ä´ºº¤ÎÂоݤˤ·¤Æ¤¤¤Þ¤»¤ó¡£
¥µ¡¼¥Ó¥¹¤Ø¤Î±Æ¶Á¤¬¹Í¤¨¤é¤ì¤ë¤Î¤Ï¡¢SYN_RECV¾õÂ֤Υ¨¥ó¥È¥ê¤¬ºï½ü¤µ¤ì¤ë¤È¤­¤Î¤ß(¢¨)¤Ê¤Î¤Ç¡¢¤½¤Î³ä¹ç¤ò¬Äꤷ¤Þ¤·¤¿¡£
(¢¨KLab¤Ç¤ÏDSR¹½À®¤Ë¤·¤Æ¤ª¤ê¡¢SYNACK¾õÂ֤ˤϤʤé¤Ê¤¤¤¿¤á¤Ç¤¹¡£°Ê¹ß¡¢DSR¹½À®¤Ç¤ÎÄ´ºº¤Î¾Ò²ð¤Ë¤Ê¤ê¤Þ¤¹¡£)

LVS·Ðͳ¤ÇWeb¥µ¡¼¥Ð¤ÈÄÌ¿®¤¹¤ë¾ì¹ç¡¢SYN_RECV¾õÂ֤Υ¨¥ó¥È¥ê¤¬ºï½ü¤µ¤ì¤ë¤È¡¢Web¥µ¡¼¥Ð¤«¤é¤ÎSYN,ACK¤ÏÊ֤äƤ­¤Þ¤¹¤¬¡¢¥¯¥é¥¤¥¢¥ó¥È¤«¤é¤ÎACK¤¬Web¥µ¡¼¥Ð¤ËÆϤ«¤Ê¤¯¤Ê¤ê¡¢¤ª¸ß¤¤¤ËºÆÁ÷¤ò·«¤êÊÖ¤·¡¢ºÇ½ªÅª¤Ëtimeout¤·¤Þ¤¹¡£ ¤Ê¤Î¤Ç¡¢»ØÄꤷ¤¿²ó¿ô¤Îhttp¥ê¥¯¥¨¥¹¥È¤ò¹Ô¤Ã¤Ætimeout¤Ë¤Ê¤Ã¤¿²ó¿ô¤ò¥«¥¦¥ó¥È¤¹¤ë¥¹¥¯¥ê¥×¥È¤òºîÀ®¤·¤Æ¡¢¥¨¥ó¥È¥êºï½ü¤Î²ó¿ô¤ò¬¤ê¤Þ¤·¤¿¡£
LVS¤Ç¤Ï¡¢/proc/sys/net/ipv4/vs/drop_entry ¤Ë3¤òÀßÄꤷ¡¢drop entryµ¡Ç½¤ò¾ï¤ËÍ­¸ú¤Ë¤·¤Æ¤¤¤Þ¤¹¡£¸¡¾Ú´Ä¶­Æâ¤Ç¡¢¼¡¤Î¿Þ¤Î¹½À®¤Ç¬Äê¤ò¹Ô¤¤¤Þ¤·¤¿¡£


packet_flow2

¤³¤Î¾ì¹ç¡¢²¿ÅÙ¥¹¥¯¥ê¥×¥È¤ò¼Â¹Ô¤·¤Æ¤â¥¨¥ó¥È¥ê¤Ïºï½ü¤µ¤ì¤º¡¢timeout¤ÏȯÀ¸¤·¤Þ¤»¤ó¤Ç¤·¤¿¡£
¤³¤ì¤Ï¡¢Â¬ÄêÍÑ¥µ¡¼¥Ð¤ÈLVS¤¬¥Í¥Ã¥È¥ï¡¼¥¯Åª¤ËÈó¾ï¤Ë¶á¤¯¡¢¿Þ¤Î­¢¡Á­¦¤Î´Ö¤Î½êÍ×»þ´Ö¤¬0.3msÄøÅÙ¤À¤Ã¤¿¤¿¤á¡¢drop entry¤Î½èÍý¤Ë°ú¤Ã¤«¤«¤é¤Ê¤«¤Ã¤¿¤¿¤á¤È¹Í¤¨¤é¤ì¤Þ¤¹¡£

SYN_RECV¾õÂ֤λþ´Ö¤¬Ã»¤¤Êý¤¬¡¢drop entryµ¡Ç½¤Çºï½ü¤µ¤ì¤Ë¤¯¤¯¤Ê¤ë¤³¤È¤òÀâÌÀ¤¹¤ë¤¿¤á¡¢¥¤¥á¡¼¥¸¿Þ1,2¤òºîÀ®¤·¤Þ¤·¤¿¡£

drop_entry_image3

¿ÞÆâ¤ÎÌð°õ¤ÏIPVS¤Î¥³¥Í¥¯¥·¥ç¥ó¥Ï¥Ã¥·¥å¥Æ¡¼¥Ö¥ë¾å¤Ë¸ºß¤¹¤ëSYN_RECV¾õÂ֤Υ¨¥ó¥È¥ê¤òɽ¤·¡¢Ìð°õ¤ÎŤµ¤¬SYN_RECV¾õÂ֤Ǥ¢¤ë»þ´Ö¤Ç¤¹¡£ ¤Þ¤¿¡¢1É䪤­¤Ë¼Â¹Ô¤µ¤ì¤ëdrop entryµ¡Ç½¤Î¥¹¥­¥ã¥ó¤Èºï½ü¤Î½èÍý¤ò¡¢ÀĤÎĹÊý·Á¤Çɽ¤·¤Þ¤·¤¿¡£ ¤¹¤ë¤È¡¢¤³¤ÎĹÊý·Á¤È½Å¤Ê¤Ã¤¿Ìð°õ(¥¨¥ó¥È¥ê)¤¬¡¢drop entry¤Çºï½ü¤µ¤ì¤ë¤È¹Í¤¨¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£

drop_entry_image4

¿Þ2¤Ï¡¢Ìð°õ¤ÎŤµ¤À¤±¤òÊѹ¹¤·¤¿¤â¤Î¤Ç¡¢¿Þ1¤ÎȾʬ¤Ë¤·¤Æ¤¤¤Þ¤¹¡£SYN_RECV¾õÂÖ¤¬Ã»¤¤¤Û¤É¡¢drop entry¤Î½èÍý¤Ë°ú¤Ã¤«¤«¤ê¤Ë¤¯¤¯¡¢ºï½ü¤µ¤ì¤Ë¤¯¤¤¤³¤È¤¬¥¤¥á¡¼¥¸¤Ç¤­¤ë¤È»×¤¤¤Þ¤¹¡£
¤½¤ì¤Ç¤Ï¼¡¤Ë¡¢¼ÂºÝ¤Ë¬Äꤷ¤Æ¤ß¤Þ¤¹¡£

ÃÙ±ä¤ò¹Íθ¤·¤¿Â¬Äê

¼ÂºÝ¤ÎÄÌ¿®¤Ç¤Ï¡¢¥Ñ¥±¥Ã¥È¤Ï³°Éô¤Î²óÀþ¤òή¤ì¤ë¤Î¤Ç¤½¤ÎʬÃٱ䤷¤Þ¤¹¡£Ãٱ䤬Â礭¤±¤ì¤Ð¥¨¥ó¥È¥ê¤¬SYN_RECV¾õÂ֤Ǥ¢¤ë»þ´Ö¤¬Ä¹¤¯¤Ê¤ë¤¿¤á¡¢ºï½ü¤µ¤ì¤ë³ä¹ç¤¬Â¿¤¯¤Ê¤ë¤ÈͽÁÛ¤µ¤ì¤Þ¤¹¡£
¤½¤³¤Ç¡¢Â¬ÄêÍÑ¥µ¡¼¥Ð¾å¤Çtc¥³¥Þ¥ó¥É¤ò»ÈÍѤ·¤Æ¡¢³°Éô¤ÈÄÌ¿®¤¹¤ëºÝ¤ËȯÀ¸¤¹¤ëÃÙ±ä¤ò¸¡¾Ú´Ä¶­Æâ¤ÇºÆ¸½¤·¤¿¾å¤Ç¡¢ºÆÅÙ¬Äꤷ¤Æ¤ß¤Þ¤·¤¿¡£

packet_flow1

¼ê¸µ¤Î¥¹¥Þ¥Û¤«¤éLVS¤Øping¤¹¤ë¤È¡¢±ýÉü¤Ë100ms¤Û¤É¤«¤«¤Ã¤Æ¤¤¤¿¤Î¤Ç¡¢ 50ms,100ms,200ms¤Î3Ä̤ê¤ÎÃÙ±ä»þ´Ö¤Ç¡¢ºï½ü¤µ¤ì¤ë¥¨¥ó¥È¥ê¿ô¤ò³Îǧ¤·¤Þ¤·¤¿¡£ ¤½¤Î·ë²Ì¤¬¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£

tc¤Ç»ØÄꤷ¤¿ÃÙ±ä»þ´Ö50ms100ms200ms
¥¨¥ó¥È¥êºï½ü²ó¿ô / Á´¥ê¥¯¥¨¥¹¥È¿ô37²ó / 32000²ó79²ó / 32000²ó201²ó / 32000²ó
¥¨¥ó¥È¥êºï½ü¤µ¤ì¤¿³ä¹ç0.115625 %0.246875 %0.628125 %

¤É¤ÎÃÙ±ä¤Î¾ì¹ç¤â¤ª¤è¤½¡¢80 Requests per Second (·×¬»þ´Ö400ÉÃ)¤È¤Ê¤ë¤è¤¦¤Ë¬Äꤷ¤Æ¤¤¤Þ¤¹¡£
ͽÁÛÄ̤ꡢÃÙ±ä»þ´Ö¤¬Â礭¤¤¤Û¤Éºï½ü¤µ¤ì¤ë¥¨¥ó¥È¥ê¿ô¤¬Â¿¤¯¤Ê¤ê¤Þ¤·¤¿¡£

Ç°¤Î¤¿¤áÁ°²ó¤Îµ­»ö¤ÈƱÍͤËhping¤ò»ÈÍѤ·¤Æ¡¢¥¨¥ó¥È¥ê¿ô¤¬°Û¾ï¤ËÁý¤¨¤¿¾ì¹ç¤Îtimeout¤Î³ä¹ç¤âÄ´¤Ù¤Þ¤·¤¿¤¬¡¢·ë²Ì¤Ï¤Û¤ÜÊѤï¤ê¤Þ¤»¤ó¤Ç¤·¤¿¡£Î㤨¤Ð¡¢hping¤ÇSYN¥Ñ¥±¥Ã¥È¤ò350kpps¤ÎÉÑÅÙ¤ÇÁ÷¤ê¤Ä¤±¤ë¤È¡¢LVS¤ÎÁí¥¨¥ó¥È¥ê¿ô¤¬1300ËüÄøÅ٤ˤʤê¤Þ¤·¤¿¡£¤½¤Î¾õÂÖ¤Ç100msÃٱ䤵¤»¤¿Â¬ÄêÍÑ¥µ¡¼¥Ð¤«¤é¾å¤ÈƱ¤¸Â¬Äê¤ò¹Ô¤Ã¤¿·ë²Ì¡¢timeout¿ô¤Ï70²ó(¤ª¤è¤½0.22%)¤Ç¤·¤¿¡£
¤¿¤À¤·¡¢pps¤¬Â礭¤¯¡¢ÅÓÃæ·ÐÏ©¤äLVS,Web¥µ¡¼¥Ð¤Ç¥Ñ¥±¥í¥¹¤¬È¯À¸¤·¤Æ¤·¤Þ¤¦¤Û¤É¤Î¾ì¹ç¤Ï¡¢¥Ñ¥±¥Ã¥È¤ÎºÆÁ÷¤Ë¤è¤êÃٱ䤬Â礭¤¯¤Ê¤ê¡¢ºï½ü¤µ¤ì¤ë¥¨¥ó¥È¥ê¿ô¤¬¾å¤Î·ë²Ì¤è¤ê¿¤¯¤Ê¤ë¤È»×¤¤¤Þ¤¹¤Î¤Ç¤´Ãí°Õ¤¯¤À¤µ¤¤¡£

¤Þ¤È¤á

Ä´ºº¤Î·ë²Ì¡¢ÄÌ¿®¤ÎÃÙ±ä»þ´Ö¤¬¥¨¥ó¥È¥êºï½ü¤Î³ä¹ç¤Ë´Ø·¸¤·¤Æ¤¤¤ë¤³¤È¤¬¤ï¤«¤ê¤Þ¤·¤¿¡£
ÃÙ±ä¤Ï¥¯¥é¥¤¥¢¥ó¥È¤ÎÄÌ¿®´Ä¶­¤ä¥Í¥Ã¥È¥ï¡¼¥¯Åª¤Êµ÷Î¥¤Ê¤É¤Ë¤â°Í¤ë¤Î¤Ç°ì³µ¤Ë¤Ï¸À¤¨¤Þ¤»¤ó¡£ ¤·¤«¤·¡¢200ms°Ê²¼¤ÎÃÙ±ä¤Ê¤éºï½ü¤µ¤ì¤ë³ä¹ç¤Ï1%¤ËËþ¤¿¤Ê¤«¤Ã¤¿¤Î¤Ç¡¢SYN¥Ñ¥±¥Ã¥È¤¬ÂçÎ̤ËÅþÍ褷»Ï¤á¤¿¤éÁᤤÃʳ¬¤Çdrop entry¤òÍ­¸ú¤Ë¤·¡¢LVS¤ÎÂÑÀ­¤ò¾å¤²¤ë¤³¤È¤òÍ¥À褷¤ÆÎɤ¤¤Î¤Ç¤Ï¤Ê¤¤¤Ç¤·¤ç¤¦¤«¡£

okamura_h at 17:10¨¢Comments(0)¨¢lvs 

¤³¤Îµ­»ö¤Ë¥³¥á¥ó¥È¤¹¤ë

̾Á°:
URL:
  ¾ðÊó¤òµ­²±: ɾ²Á: ´é    À±
 
 
 
BlogÆ⸡º÷
Archives
¤³¤Î¥Ö¥í¥°¤Ë¤Ä¤¤¤Æ
DSAS¤È¤Ï¡¢KLab ¤¬¹½ÃÛ¤·±¿ÍѤ·¤Æ¤¤¤ë¥³¥ó¥Æ¥ó¥Ä¥µ¡¼¥Ó¥¹ÍѤÎLinux¥Ù¡¼¥¹¤Î¥¤¥ó¥Õ¥é¤Ç¤¹¡£¸½ºß5¥ö½ê¤Î¥Ç¡¼¥¿¥»¥ó¥¿¤Ë¤Æ¹½ÃÛ¤·¡¢±¿ÍѤ·¤Æ¤¤¤Þ¤¹¤¬¡¢²æ¡¹¤ÏDSAS¤ò¤è¤ê»È¤¤¤ä¤¹¤¯¡¢¤è¤ê°ÂÁ´¤Ë¡¢¤½¤·¤Æ¤è¤ê¾ÊÎϤDZ¿ÍѤǤ­¤ë¤³¤È¤òÌܻؤ·¤Æ¡¢Æü¡¹²þÎɤ˶Ф·¤ó¤Ç¤¤¤Þ¤¹¡£
¤³¤Î¥Ö¥í¥°¤Ç¤Ï¡¢¤½¤ó¤Ê DSAS ¤Ç»È¤Ã¤Æ¤¤¤ëµ»½Ñ¤Î¾Ò²ð¤ä¡¢¼Â¸³¤·¤Æ¤ß¤¿·ë²Ì¤ÎÊó¹ð¡¢¥È¥é¥Ö¥ë¤Ë´¬¤­¹þ¤Þ¤ì¤¿»þ¤Î·Ð¸³Ã̤ʤɡ¢¹­¤¯¿¼¤¯¡¢¿§¡¹¤ÊÏÃÂê¤ò¿¥¤ê¤Þ¤¼¤Æ¾Ò²ð¤·¤Æ¤¤¤­¤¿¤¤¤È»×¤¤¤Þ¤¹¡£
ºÇ¿·¥³¥á¥ó¥È