ÔõÑùͨ¹ý¸¡Í¼Ãæ°å¾ÙÐÐÍøÕ¾ÐÔÄÜѹ²âºÍµ÷ÓÅ
Ëæ×Å»¥ÁªÍøµÄ¿ìËÙÉú³¤£¬ÍøÕ¾ÐÔÄܹØÓÚÓû§ÌåÑéºÍseoÅÅÃûµÄÓ°ÏìÔ½À´Ô½´ó¡£ÎªÁËÌá¸ß×Ô¼ºµÄÍøÕ¾ÐÔÄÜ£¬ÎÒÃÇÐèÒª¾ÙÐÐÐÔÄÜѹ²âºÍµ÷ÓÅÀ´¶¨Î»ÎÊÌâ²¢¾ÙÐÐÓÅ»¯¡£¶ø¸¡Í¼Ãæ°å×÷Ϊһ¸ö¹ãÊܽӴýµÄЧÀÍÖÎÀíÃæ°å£¬ÌṩÁËÀû±ã¼òÆÓµÄÐÔÄÜѹ²âºÍµ÷ÓŹ¤¾ß¡£ÏÂÃ潫ÏÈÈÝÔõÑùͨ¹ý¸¡Í¼Ãæ°å¾ÙÐÐÍøÕ¾ÐÔÄÜѹ²âºÍµ÷ÓÅ¡£
Ò»¡¢ÐÔÄÜѹ²â
ÐÔÄÜѹ²âÊÇͨ¹ýÄ£ÄâÓû§»á¼ûÀ´²âÊÔÍøÕ¾µÄ¸ºÔØÄÜÁ¦ºÍÏìÓ¦ËÙÂÊ¡£ÔÚ¸¡Í¼Ãæ°åÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃApache Bench¾ÙÐмòÆÓµÄÐÔÄÜѹ²â¡£
×°ÖÃApache Bench
ÔÚ¸¡Í¼Ãæ°åµÄ¡°Èí¼þÊÐËÁ¡±ÖÐËÑË÷¡°Apache Bench¡±£¬È»ºóµã»÷¡°×°Öᱡ£×°ÖÃÍê³Éºó£¬ÔÚ¡°Èí¼þÖÎÀí¡±ÖпÉÒÔ¿´µ½Apache BenchµÄ°æ±¾ºÍ·¾¶¡£
Ö´ÐÐÐÔÄÜѹ²â
ÔÚ¸¡Í¼Ãæ°åÖÐÑ¡ÕªÒª¾ÙÐÐÐÔÄÜѹ²âµÄÍøÕ¾£¬²¢·¿ª¡°ÍøÕ¾ÉèÖá±£¬ÔÚ¡°×Ô½ç˵ÉèÖá±ÖÐÕÒµ½¡°ApacheÉèÖÃÎļþ¡±£¬µã»÷¡°±à¼¡±£¬½«ÒÔÏ´úÂëÌí¼Óµ½Îļþĩβ¡£
<Location /bench> SetHandler none Require all granted </Location>
µÇ¼ºó¸´ÖÆ
ÉúÑÄÎļþºó£¬ÔÚä¯ÀÀÆ÷ÖÐÊäÈë¡°http://ÄãµÄÍøÕ¾µØµã/bench¡±£¬¼´¿É½øÈëApache BenchµÄѹ²â½çÃæ¡£ÔÚ¡°ÇëÇóÊýÄ¿¡±ºÍ¡°²¢·¢ÊýÄ¿¡±ÖÐÊäÈëÐèÒª²âÊÔµÄÊýÖµ£¬µã»÷¡°×îÏȲâÊÔ¡±¼´¿É×îÏÈÐÔÄܲâÊÔ¡£
¶þ¡¢ÐÔÄܵ÷ÓÅ
ÐÔÄܵ÷ÓÅÊÇ̫ͨ¹ýÎöÍøÕ¾µÄ»á¼ûÈÕÖ¾ºÍЧÀÍÆ÷×ÊԴʹÓÃÇéÐεÈÀ´µ÷½âÍøÕ¾µÄÉèÖúÍÓÅ»¯Ð§ÀÍÆ÷¡£ÔÚ¸¡Í¼Ãæ°åÖУ¬ÎÒÃÇ¿ÉÒÔͨ¹ýÈÕÖ¾ÆÊÎö¹¤¾ßºÍÐÔÄÜÓÅ»¯¹¤¾ß¾ÙÐÐÐÔÄܵ÷ÓÅ¡£
ÈÕÖ¾ÆÊÎö¹¤¾ß
ÔÚ¸¡Í¼Ãæ°åÖÐÑ¡ÕªÒª¾ÙÐÐÐÔÄܵ÷ÓŵÄÍøÕ¾£¬²¢·¿ª¡°ÈÕÖ¾¡±Ò³Ãæ¡£ÔÚ¡°ÍøÕ¾ÈÕÖ¾¡±ÖÐÕÒµ½¡°»á¼ûÈÕÖ¾¡±ºÍ¡°¹ýʧÈÕÖ¾¡±£¬µã»÷¡°ÆÊÎö¡±£¬¼´¿É½øÈëÈÕÖ¾ÆÊÎö¹¤¾ß¡£
ÔÚÈÕÖ¾ÆÊÎö¹¤¾ßÖУ¬ÎÒÃÇ¿ÉÒÔÆÊÎöÍøÕ¾µÄ»á¼ûÇéÐΡ¢Óû§ÂþÑÜ¡¢»á¼û·¾¶ºÍÏìӦʱ¼äµÈÐÅÏ¢¡£Í¨¹ýÕâЩÐÅÏ¢£¬ÎÒÃÇ¿ÉÒÔÏàʶÍøÕ¾µÄ»á¼ûÆ¿¾±ºÍÐÔÄÜÎÊÌ⣬Ȼºó¶ÔÍøÕ¾¾ÙÐÐÏìÓ¦µÄÓÅ»¯ºÍµ÷½â¡£
ÐÔÄÜÓÅ»¯¹¤¾ß
ÔÚ¸¡Í¼Ãæ°åÖÐÑ¡ÕªÒª¾ÙÐÐÐÔÄܵ÷ÓŵÄÍøÕ¾£¬²¢·¿ª¡°¸ß¼¶¹¦Ð§¡±Ò³Ãæ¡£ÔÚ¡°ÏµÍ³ÇéÐΡ±ÖÐÕÒµ½¡°ÐÔÄÜÓÅ»¯¹¤¾ß¡±£¬µã»÷¡°Ö´ÐС±£¬¼´¿É×îÏÈÐÔÄÜÓÅ»¯¡£
ÐÔÄÜÓÅ»¯¹¤¾ß¿ÉÒÔ×ÊÖúÎÒÃǶÔЧÀÍÆ÷¾ÙÐÐÐÔÄܵ÷½â£¬°üÀ¨µ÷½âЧÀÍÆ÷²ÎÊý¡¢ÓÅ»¯CPUºÍÄÚ´æʹÓá¢ÓÅ»¯Êý¾Ý¿âÐÔÄÜ¡¢»º´æÉèÖõȡ£Í¨¹ýÕâЩµ÷½â£¬¿ÉÒÔÓÐÓÃÌáÉýÍøÕ¾µÄÐÔÄܺÍÏìÓ¦ËÙÂÊ¡£
×ÛÉÏËùÊö£¬Í¨¹ý¸¡Í¼Ãæ°å¾ÙÐÐÍøÕ¾ÐÔÄÜѹ²âºÍµ÷ÓÅ¿ÉÒÔ×ÊÖúÎÒÃǶ¨Î»Íøվƿ¾±ºÍÐÔÄÜÎÊÌ⣬²¢¾ÙÐÐÏìÓ¦µÄÓÅ»¯ºÍµ÷½â¡£ÔÚ¾ÙÐÐÐÔÄܲâÊÔºÍÐÔÄܵ÷ÓÅʱ£¬ÐèҪעÖر¸·ÝÖ÷ÒªÊý¾Ý£¬ÒÔÃâÒâÍâµ¼ÖÂÊý¾Ýɥʧ¡£
ÒÔÉϾÍÊÇÔõÑùͨ¹ý¸¡Í¼Ãæ°å¾ÙÐÐÍøÕ¾ÐÔÄÜѹ²âºÍµ÷ÓŵÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡