From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 709282BC9 for ; Thu, 10 Mar 2016 09:35:41 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 10 Mar 2016 00:35:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,314,1455004800"; d="scan'208";a="933676269" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 10 Mar 2016 00:35:39 -0800 Received: from shecgisg003.sh.intel.com (shecgisg003.sh.intel.com [10.239.29.90]) by shvmail01.sh.intel.com with ESMTP id u2A8ZbGY032590; Thu, 10 Mar 2016 16:35:37 +0800 Received: from shecgisg003.sh.intel.com (localhost [127.0.0.1]) by shecgisg003.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id u2A8ZZhn026879; Thu, 10 Mar 2016 16:35:37 +0800 Received: (from jingguox@localhost) by shecgisg003.sh.intel.com (8.13.6/8.13.6/Submit) id u2A8ZY68026875; Thu, 10 Mar 2016 16:35:34 +0800 From: Jingguo Fu To: dts@dpdk.org Date: Thu, 10 Mar 2016 16:35:31 +0800 Message-Id: <1457598932-26845-1-git-send-email-jingguox.fu@intel.com> X-Mailer: git-send-email 1.7.4.1 Cc: Jingguo Fu Subject: [dts] [DTS][PATCH V2 1/2] unit test: add memcpy performance unit test plan X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Mar 2016 08:35:42 -0000 case name: memcpy_perf_analysis it will show four ratio value for the performance v2: add performance data example and description of a abstraction. Signed-off-by: Jingguo Fu --- test_plans/unit_tests_memcpy_perf_test_plan.rst | 251 ++++++++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 test_plans/unit_tests_memcpy_perf_test_plan.rst diff --git a/test_plans/unit_tests_memcpy_perf_test_plan.rst b/test_plans/unit_tests_memcpy_perf_test_plan.rst new file mode 100644 index 0000000..c23fd86 --- /dev/null +++ b/test_plans/unit_tests_memcpy_perf_test_plan.rst @@ -0,0 +1,251 @@ +.. Copyright (c) <2010, 2016>, Intel Corporation + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + - Neither the name of Intel Corporation nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +====================== +Test suite description +====================== + +This document is for dpdk unit test: memcpy performance auto test. +For this suite, mainily aims to analysis the cache to cache memcpy +performance after run the memcpy performance unit test. + +The performance data is divided into four parts. Each part has two +colums data for cache to cache performance. After extract the data, +compute the geomatric mean for each colum, and then let the second +geomatric divide the first goematric mean, then get the ratio of the +two geomatric means. + +if the ratio greater than 1, then the test got a great performance. + +perf data: +** rte_memcpy() - memcpy perf. tests (C = compile-time constant) ** +======= ============== ============== ============== ============== + Size Cache to cache Cache to mem Mem to cache Mem to mem +(bytes) (ticks) (ticks) (ticks) (ticks) +------- -------------- -------------- -------------- -------------- +========================== 32B aligned ============================ + 1 5 - 7 9 - 29 23 - 25 31 - 51 + 2 5 - 7 9 - 30 23 - 25 31 - 51 + 3 5 - 8 14 - 30 26 - 28 35 - 52 + 4 5 - 7 9 - 30 23 - 25 31 - 52 + 5 5 - 7 14 - 30 27 - 28 35 - 53 + 6 5 - 7 14 - 30 26 - 28 35 - 53 + 7 6 - 7 16 - 30 30 - 27 38 - 53 + 8 5 - 7 9 - 30 21 - 25 30 - 52 + 9 6 - 8 14 - 30 25 - 28 35 - 53 + 12 5 - 8 14 - 30 25 - 27 34 - 53 + 15 7 - 8 17 - 30 33 - 27 40 - 53 + 16 14 - 7 14 - 30 18 - 25 32 - 53 + 17 14 - 7 14 - 29 18 - 25 32 - 53 + 31 14 - 7 14 - 30 18 - 25 32 - 53 + 32 14 - 21 14 - 23 18 - 27 32 - 51 + 33 17 - 21 24 - 42 30 - 42 48 - 73 + 63 17 - 21 24 - 42 30 - 42 48 - 73 + 64 17 - 21 22 - 41 25 - 29 47 - 84 + 65 34 - 21 43 - 56 44 - 43 69 - 99 + 127 34 - 22 53 - 69 45 - 45 85 - 116 + 128 48 - 23 50 - 67 53 - 40 86 - 116 + 129 48 - 25 64 - 81 61 - 51 105 - 131 + 191 48 - 28 75 - 94 63 - 57 120 - 147 + 192 51 - 30 74 - 92 60 - 53 119 - 145 + 193 51 - 31 84 - 107 70 - 62 138 - 168 + 255 51 - 35 96 - 119 75 - 69 152 - 182 + 256 48 - 37 120 - 116 72 - 67 183 - 181 + 257 48 - 38 142 - 131 82 - 76 214 - 208 + 319 48 - 45 157 - 142 86 - 86 237 - 223 + 320 52 - 41 159 - 137 85 - 84 238 - 214 + 321 51 - 45 168 - 151 95 - 91 256 - 238 + 383 51 - 51 183 - 167 101 - 99 272 - 265 + 384 58 - 48 177 - 166 104 - 98 271 - 258 + 385 58 - 52 189 - 178 112 - 103 289 - 281 + 447 58 - 58 201 - 189 118 - 112 310 - 294 + 448 62 - 56 203 - 187 117 - 112 309 - 288 + 449 62 - 59 212 - 202 127 - 118 325 - 309 + 511 62 - 66 225 - 216 132 - 125 343 - 332 + 512 62 - 62 226 - 214 128 - 126 342 - 331 + 513 78 - 65 194 - 227 144 - 131 302 - 352 + 767 101 - 92 262 - 307 183 - 179 416 - 478 + 768 99 - 89 261 - 308 183 - 180 415 - 472 + 769 104 - 92 269 - 312 187 - 185 425 - 481 + 1023 129 - 119 296 - 322 216 - 215 465 - 517 + 1024 129 - 116 294 - 322 215 - 216 466 - 517 + 1025 132 - 119 304 - 328 221 - 219 474 - 524 + 1518 182 - 173 375 - 437 285 - 286 602 - 691 + 1522 183 - 173 375 - 435 285 - 286 602 - 690 + 1536 182 - 170 373 - 436 286 - 288 601 - 681 + 1600 189 - 177 384 - 447 299 - 296 621 - 712 + 2048 238 - 224 459 - 530 357 - 362 754 - 856 + 2560 292 - 279 546 - 634 432 - 434 895 - 1010 + 3072 347 - 333 626 - 744 503 - 505 1039 - 1143 + 3584 401 - 388 710 - 834 571 - 574 1177 - 1314 + 4096 455 - 442 794 - 932 640 - 639 1309 - 1457 + 4608 509 - 495 875 - 1032 709 - 707 1451 - 1589 + 5120 564 - 552 953 - 1122 777 - 775 1582 - 1731 + 5632 618 - 604 1035 - 1222 843 - 846 1726 - 1881 + 6144 673 - 659 1130 - 1321 916 - 916 1864 - 2015 + 6656 726 - 714 1211 - 1411 984 - 985 2000 - 2169 + 7168 781 - 767 1291 - 1508 1050 - 1052 2135 - 2295 + 7680 836 - 822 1374 - 1598 1117 - 1117 2263 - 2424 + 8192 888 - 876 1454 - 1685 1185 - 1187 2404 - 2568 +------- -------------- -------------- -------------- -------------- +C 6 3 - 3 14 - 14 17 - 16 31 - 31 +C 64 11 - 11 21 - 21 25 - 23 46 - 46 +C 128 18 - 17 47 - 46 40 - 37 80 - 81 +C 192 24 - 24 71 - 71 53 - 51 114 - 115 +C 256 31 - 32 94 - 94 67 - 66 148 - 149 +C 512 59 - 62 184 - 184 124 - 124 282 - 283 +C 768 103 - 88 261 - 242 181 - 179 414 - 414 +C 1024 132 - 116 295 - 282 214 - 218 465 - 477 +C 1536 184 - 171 373 - 437 284 - 287 602 - 677 +=========================== Unaligned ============================= + 1 5 - 7 9 - 30 23 - 25 31 - 51 + 2 5 - 7 8 - 30 23 - 25 31 - 51 + 3 5 - 7 14 - 30 26 - 26 35 - 51 + 4 4 - 7 8 - 30 23 - 25 31 - 51 + 5 5 - 7 14 - 29 26 - 26 35 - 51 + 6 5 - 7 14 - 29 26 - 26 35 - 51 + 7 6 - 7 16 - 29 30 - 26 38 - 52 + 8 5 - 7 8 - 30 21 - 25 31 - 51 + 9 6 - 7 14 - 29 25 - 26 34 - 52 + 12 5 - 8 14 - 29 25 - 26 34 - 52 + 15 6 - 8 17 - 29 33 - 26 40 - 52 + 16 14 - 7 14 - 30 18 - 24 32 - 52 + 17 14 - 8 14 - 29 18 - 25 32 - 52 + 31 14 - 7 15 - 29 27 - 38 40 - 58 + 32 14 - 21 25 - 44 27 - 32 48 - 79 + 33 18 - 21 44 - 43 27 - 33 69 - 79 + 63 18 - 21 24 - 42 33 - 43 57 - 85 + 64 18 - 21 33 - 61 33 - 43 64 - 103 + 65 35 - 21 51 - 57 41 - 41 90 - 101 + 127 34 - 22 55 - 70 51 - 51 92 - 125 + 128 34 - 23 64 - 83 52 - 50 101 - 135 + 129 34 - 25 82 - 83 50 - 50 127 - 135 + 191 34 - 29 76 - 96 62 - 63 125 - 160 + 192 38 - 31 87 - 108 64 - 63 135 - 170 + 193 38 - 32 105 - 110 63 - 62 163 - 174 + 255 38 - 35 100 - 121 76 - 75 160 - 195 + 256 38 - 38 114 - 131 76 - 76 170 - 206 + 257 38 - 48 130 - 129 76 - 82 202 - 200 + 319 38 - 53 125 - 144 90 - 107 193 - 233 + 320 41 - 55 136 - 157 91 - 98 203 - 243 + 321 41 - 55 155 - 157 91 - 98 239 - 243 + 383 42 - 56 150 - 166 105 - 117 228 - 263 + 384 41 - 61 162 - 177 104 - 109 237 - 272 + 385 45 - 61 178 - 177 105 - 109 274 - 272 + 447 48 - 61 174 - 190 119 - 128 263 - 301 + 448 48 - 71 185 - 205 119 - 122 271 - 319 + 449 52 - 71 205 - 204 119 - 122 317 - 319 + 511 55 - 71 198 - 218 132 - 138 296 - 341 + 512 56 - 77 209 - 230 134 - 135 307 - 357 + 513 79 - 77 201 - 230 145 - 135 306 - 357 + 767 101 - 93 267 - 307 188 - 188 425 - 487 + 768 105 - 96 276 - 310 189 - 188 430 - 490 + 769 104 - 96 276 - 310 189 - 188 430 - 490 + 1023 129 - 119 299 - 318 223 - 222 473 - 518 + 1024 130 - 123 308 - 324 225 - 223 479 - 523 + 1025 131 - 123 308 - 324 225 - 224 479 - 523 + 1518 182 - 178 386 - 429 292 - 293 617 - 691 + 1522 182 - 177 386 - 430 292 - 293 618 - 692 + 1536 185 - 177 392 - 435 298 - 296 629 - 698 + 1600 193 - 184 403 - 449 312 - 311 646 - 741 + 2048 238 - 231 474 - 528 369 - 366 777 - 852 + 2560 293 - 285 561 - 629 445 - 441 918 - 996 + 3072 347 - 339 641 - 733 517 - 513 1064 - 1132 + 3584 403 - 394 724 - 822 583 - 580 1201 - 1290 + 4096 455 - 448 806 - 924 652 - 649 1338 - 1430 + 4608 512 - 502 894 - 1022 725 - 715 1477 - 1561 + 5120 563 - 557 973 - 1114 790 - 783 1617 - 1702 + 5632 622 - 611 1058 - 1216 854 - 847 1749 - 1844 + 6144 676 - 666 1144 - 1313 924 - 919 1899 - 1985 + 6656 729 - 719 1227 - 1400 990 - 985 2035 - 2122 + 7168 785 - 775 1307 - 1503 1059 - 1055 2173 - 2263 + 7680 840 - 828 1392 - 1593 1128 - 1122 2318 - 2402 + 8192 894 - 881 1467 - 1674 1188 - 1183 2447 - 2532 +------- -------------- -------------- -------------- -------------- +C 6 3 - 3 14 - 14 17 - 16 31 - 31 +C 64 10 - 11 32 - 32 32 - 30 63 - 64 +C 128 17 - 17 60 - 60 46 - 44 99 - 99 +C 192 24 - 24 86 - 86 61 - 59 133 - 134 +C 256 31 - 31 110 - 208 75 - 74 168 - 374 +C 512 58 - 61 204 - 382 133 - 133 305 - 763 +C 768 105 - 88 275 - 486 188 - 189 429 - 905 +C 1024 134 - 115 308 - 511 224 - 231 480 - 922 +C 1536 186 - 176 392 - 435 295 - 295 628 - 698 +======= ============== ============== ============== ============== + +then four geomatric means would be calculated and results as below: +aligned perf average is 1.013 +aligned ctc perf average is 0.884 +unaligned perf average is 1.288 +unaligned ctc perf average is 2.117 + +Take the last geomean as example: +The original data as follow: +------- -------------- -------------- -------------- -------------- +C 6 3 - 3 14 - 14 17 - 16 31 - 31 +C 64 10 - 11 32 - 32 32 - 30 63 - 64 +C 128 17 - 17 60 - 60 46 - 44 99 - 99 +C 192 24 - 24 86 - 86 61 - 59 133 - 134 +C 256 31 - 31 110 - 208 75 - 74 168 - 374 +C 512 58 - 61 204 - 382 133 - 133 305 - 763 +C 768 105 - 88 275 - 486 188 - 189 429 - 905 +C 1024 134 - 115 308 - 511 224 - 231 480 - 922 +C 1536 186 - 176 392 - 435 295 - 295 628 - 698 +======= ============== ============== ============== ============== + +the third colum is: A = [3, 10, 17, 24, 31, 58, 105, 134, 186], and the +fifth colum is: B = [3, 11, 17, 24, 31, 61, 88, 115, 176] +then C[i] = B[i] / A[i], i = 0, 1, ..., len(A) - 1 +finally, calculate the geomean for the C list numbers. + +============= +Prerequisites +============= + +Test Case: memcpy_perf_analysis +=============================== + +1. run memcpy_perf unit test + ./x86_64-native-linuxapp-gcc/app/test -c f -n 1 + memcpy_perf_autotest + quit + performance data stored in memcpy_perf_auto.log file + +2. copy log file to current server +3. analysis the data ++--------------------+-----------------------+------------------+---------------------+ +| 32B Aligned(ticks) | 32B Aligned CT(ticks) | Unaligned(ticks) | Unaligned CT(ticks) | ++====================+=======================+==================+=====================+ +| 1.893 | 2.509 | 1.507 | 1.500 | ++--------------------+-----------------------+------------------+---------------------+ + +Note: CT ==> compile time constant -- 1.9.3