wanghanchi
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    --- tags: linux kernel, rpmalloc, mimalloc-bench --- # rpmalloc 測試結果 > 這邊是存放測試紀錄比較雜亂的部分 > 有整理過的部分詳情可見 [Linux 核心專題: 實作高效記憶體配置器](https://hackmd.io/22BcyuTTSJmkl3KqCtChFg) ## mimalloc-bench (x86-64) ### 測試 v1 這邊使用 ```shell $ time ../../bench.sh -n=10 rp allt ``` 來重複執行 10 次所有的測試 #### 原始的版本 ```shell #------------------------------------------------------------------ # test alloc time rss user sys page-faults page-reclaims cfrac rp 02.99 4040 2.99 0.00 0 744 cfrac rp 03.04 4032 3.04 0.00 0 745 cfrac rp 03.04 4064 3.04 0.00 0 744 cfrac rp 03.03 4040 3.03 0.00 0 744 cfrac rp 03.02 4024 3.02 0.00 0 747 cfrac rp 03.04 3996 3.03 0.00 0 744 cfrac rp 03.09 3984 3.09 0.00 0 743 cfrac rp 03.04 4004 3.04 0.00 0 744 cfrac rp 03.05 4032 3.05 0.00 0 744 cfrac rp 03.06 4104 3.06 0.00 0 745 espresso rp 03.16 7888 3.15 0.00 0 1777 espresso rp 03.14 7888 3.14 0.00 0 1777 espresso rp 03.14 7888 3.14 0.00 0 1778 espresso rp 03.15 7888 3.13 0.02 0 1777 espresso rp 03.15 7888 3.14 0.00 0 1778 espresso rp 03.15 7888 3.14 0.01 0 1777 espresso rp 03.14 7888 3.14 0.00 0 1777 espresso rp 03.16 7888 3.16 0.00 0 1777 espresso rp 03.15 7888 3.14 0.00 0 1776 espresso rp 03.13 7888 3.13 0.00 0 1778 barnes rp 02.34 59708 2.33 0.01 0 16932 barnes rp 02.36 59624 2.35 0.01 0 16928 barnes rp 02.35 59700 2.33 0.01 0 16931 barnes rp 02.35 59696 2.34 0.01 0 16931 barnes rp 02.36 59700 2.33 0.02 0 16931 barnes rp 02.39 59764 2.38 0.00 0 16931 barnes rp 02.35 59692 2.33 0.02 0 16931 barnes rp 02.37 59764 2.35 0.01 0 16932 barnes rp 02.36 59708 2.34 0.01 0 16933 barnes rp 02.36 59624 2.36 0.00 0 16928 redis rp 2.560 10004 0.11 0.01 0 1798 redis rp 2.599 10040 0.11 0.01 0 1795 redis rp 2.579 9972 0.10 0.02 0 1797 redis rp 2.619 9968 0.12 0.00 0 1794 redis rp 2.680 9972 0.11 0.02 0 1796 redis rp 2.640 9972 0.10 0.03 0 1795 redis rp 2.680 9976 0.10 0.03 0 1796 redis rp 2.619 9972 0.11 0.02 0 1796 redis rp 2.640 10016 0.11 0.02 0 1796 redis rp 2.700 10012 0.13 0.00 0 1794 larsonN-sized rp 3.490 149848 54.16 0.27 0 36934 larsonN-sized rp 3.519 147296 54.28 0.25 0 36292 larsonN-sized rp 3.552 142232 54.45 0.18 0 35036 larsonN-sized rp 3.560 146248 54.36 0.23 0 36036 larsonN-sized rp 3.538 146748 54.26 0.28 0 36161 larsonN-sized rp 3.542 148460 54.33 0.24 0 36587 larsonN-sized rp 3.593 143064 54.20 0.23 0 35240 larsonN-sized rp 3.608 144152 54.31 0.17 0 35514 larsonN-sized rp 3.535 147696 54.33 0.21 0 36396 larsonN-sized rp 3.553 144096 54.40 0.21 0 35494 mstressN rp 00.80 455996 5.11 0.76 0 294476 mstressN rp 00.80 459680 5.05 0.81 0 295456 mstressN rp 00.79 453888 5.12 0.75 0 293969 mstressN rp 00.81 445496 5.12 0.73 0 291958 mstressN rp 00.80 440232 5.15 0.74 0 290599 mstressN rp 00.78 444696 5.07 0.78 0 291624 mstressN rp 00.80 443172 5.08 0.77 0 291286 mstressN rp 00.79 442012 5.10 0.75 0 291064 mstressN rp 00.77 439308 5.14 0.71 0 290364 mstressN rp 00.77 442568 5.12 0.74 0 291239 rptestN rp .626 110904 1.46 0.21 0 27419 rptestN rp .664 112968 1.45 0.19 0 27938 rptestN rp .661 111348 1.44 0.19 0 27530 rptestN rp .626 112440 1.34 0.23 0 27803 rptestN rp .595 110640 1.31 0.22 0 27361 rptestN rp .610 111240 1.31 0.24 1 27509 rptestN rp .635 110908 1.41 0.18 0 27421 rptestN rp .639 110520 1.44 0.17 1 27339 rptestN rp .620 110472 1.40 0.21 0 27316 rptestN rp .647 110680 1.40 0.19 0 27370 gs rp 00.77 44020 0.75 0.01 0 7795 gs rp 00.76 43944 0.75 0.01 0 7792 gs rp 00.76 43980 0.73 0.01 0 7793 gs rp 00.75 43956 0.73 0.02 0 7795 gs rp 00.76 43912 0.75 0.00 0 7791 gs rp 00.77 43996 0.76 0.00 0 7791 gs rp 00.76 43940 0.74 0.01 0 7792 gs rp 00.77 43860 0.75 0.02 0 7791 gs rp 00.78 43908 0.77 0.01 0 7791 gs rp 00.77 43960 0.74 0.02 0 7792 lua rp 03.46 76836 3.14 0.31 0 201403 lua rp 03.43 76792 3.14 0.29 0 201406 lua rp 03.45 76824 3.18 0.26 0 201306 lua rp 03.43 76856 3.12 0.31 0 201399 lua rp 03.43 76856 3.13 0.30 0 201306 lua rp 03.45 76800 3.16 0.27 0 201424 lua rp 03.44 76728 3.18 0.25 0 201321 lua rp 03.45 76852 3.16 0.28 0 201379 lua rp 03.46 76828 3.16 0.29 0 201336 lua rp 03.44 76888 3.13 0.30 0 201320 alloc-test1 rp 02.81 12892 2.81 0.00 0 2988 alloc-test1 rp 02.72 12892 2.71 0.00 0 2989 alloc-test1 rp 02.71 12868 2.70 0.00 0 2988 alloc-test1 rp 02.73 12892 2.72 0.00 0 2990 alloc-test1 rp 02.73 12896 2.73 0.00 0 2988 alloc-test1 rp 02.70 12868 2.70 0.00 0 2989 alloc-test1 rp 02.73 12896 2.72 0.00 0 2988 alloc-test1 rp 02.76 12920 2.75 0.00 0 2992 alloc-test1 rp 02.72 12892 2.71 0.01 0 2989 alloc-test1 rp 02.73 12888 2.72 0.00 0 2990 alloc-testN rp 03.19 20224 37.00 0.04 0 4608 alloc-testN rp 03.19 20260 37.36 0.08 0 4608 alloc-testN rp 03.22 20244 37.45 0.09 0 4611 alloc-testN rp 03.27 20244 37.60 0.05 0 4610 alloc-testN rp 03.22 20236 37.45 0.01 0 4610 alloc-testN rp 03.24 20240 37.86 0.03 0 4610 alloc-testN rp 03.27 20236 37.95 0.03 0 4610 alloc-testN rp 03.25 20236 37.88 0.01 0 4610 alloc-testN rp 03.23 20256 37.70 0.12 0 4609 alloc-testN rp 03.23 20260 37.90 0.04 0 4611 sh6benchN rp 00.24 251380 2.47 0.07 0 62648 sh6benchN rp 00.24 251380 2.45 0.09 0 62649 sh6benchN rp 00.24 251380 2.46 0.08 0 62646 sh6benchN rp 00.25 251376 2.46 0.12 0 62646 sh6benchN rp 00.23 251380 2.40 0.11 0 62648 sh6benchN rp 00.23 251380 2.39 0.06 0 62649 sh6benchN rp 00.23 251380 2.38 0.12 0 62648 sh6benchN rp 00.24 251380 2.43 0.08 0 62648 sh6benchN rp 00.22 251380 2.33 0.11 0 62648 sh6benchN rp 00.23 251380 2.36 0.09 0 62648 sh8benchN rp 00.57 158328 5.98 0.05 0 39444 sh8benchN rp 00.58 163744 6.22 0.06 0 40821 sh8benchN rp 00.56 155548 5.85 0.07 0 38771 sh8benchN rp 00.60 163896 6.19 0.05 0 40835 sh8benchN rp 00.56 156552 5.83 0.09 0 39011 sh8benchN rp 00.57 157680 5.98 0.08 0 39302 sh8benchN rp 00.56 158804 5.82 0.06 0 39589 sh8benchN rp 00.56 157688 5.93 0.07 0 39283 sh8benchN rp 00.56 159928 5.85 0.09 0 39843 sh8benchN rp 00.59 159848 6.07 0.07 0 39859 xmalloc-testN rp 0.468 68944 46.13 4.70 0 17049 xmalloc-testN rp 0.531 83024 42.15 4.20 0 20569 xmalloc-testN rp 0.420 71184 43.46 4.02 3 17609 xmalloc-testN rp 0.526 75344 41.98 4.34 0 18650 xmalloc-testN rp 0.450 72524 42.82 4.21 3 17945 xmalloc-testN rp 0.498 71120 42.43 4.26 1 17599 xmalloc-testN rp 0.443 70864 42.83 4.16 1 17530 xmalloc-testN rp 0.513 80400 42.15 4.26 1 19916 xmalloc-testN rp 0.421 78480 43.29 3.91 6 19434 xmalloc-testN rp 0.373 67596 44.32 3.66 0 16712 cache-scratch1 rp 00.94 4936 0.94 0.00 0 567 cache-scratch1 rp 00.92 4864 0.92 0.00 0 567 cache-scratch1 rp 00.93 4876 0.92 0.00 0 565 cache-scratch1 rp 00.92 4936 0.92 0.00 0 566 cache-scratch1 rp 00.92 4936 0.92 0.00 0 567 cache-scratch1 rp 00.93 4876 0.92 0.00 0 567 cache-scratch1 rp 00.93 4876 0.93 0.00 0 567 cache-scratch1 rp 00.91 4860 0.91 0.00 0 567 cache-scratch1 rp 00.91 4936 0.91 0.00 0 567 cache-scratch1 rp 00.92 4860 0.92 0.00 0 567 cache-scratchN rp 00.19 4876 2.26 0.00 0 590 cache-scratchN rp 00.19 4876 2.28 0.00 0 589 cache-scratchN rp 00.19 4960 2.27 0.00 0 591 cache-scratchN rp 00.19 4960 2.28 0.00 0 590 cache-scratchN rp 00.19 4960 2.28 0.00 0 591 cache-scratchN rp 00.19 4884 2.28 0.00 0 589 cache-scratchN rp 00.19 4960 2.29 0.00 0 590 cache-scratchN rp 00.19 4884 2.30 0.00 0 590 cache-scratchN rp 00.19 4932 2.29 0.00 0 591 cache-scratchN rp 00.19 4932 2.29 0.00 0 590 glibc-simple rp 01.95 2996 1.95 0.00 0 612 glibc-simple rp 01.93 2996 1.92 0.00 0 614 glibc-simple rp 01.95 2996 1.95 0.00 0 613 glibc-simple rp 01.94 2996 1.94 0.00 0 615 glibc-simple rp 01.93 2996 1.93 0.00 0 613 glibc-simple rp 01.92 2996 1.92 0.00 0 614 glibc-simple rp 01.92 2996 1.92 0.00 0 614 glibc-simple rp 01.88 2996 1.88 0.00 0 612 glibc-simple rp 01.91 2996 1.91 0.00 0 613 glibc-simple rp 01.93 2996 1.93 0.00 0 614 glibc-thread rp 1.173 15164 23.72 0.01 9 3624 glibc-thread rp 1.275 15164 21.75 0.02 10 3626 glibc-thread rp 1.279 15164 21.71 0.01 9 3625 glibc-thread rp 1.281 15164 21.70 0.02 8 3629 glibc-thread rp 1.285 15168 21.68 0.03 9 3627 glibc-thread rp 1.276 15164 21.70 0.00 9 3626 glibc-thread rp 1.279 15164 21.67 0.00 10 3625 glibc-thread rp 1.281 15152 21.68 0.04 8 3631 glibc-thread rp 1.287 15168 21.66 0.05 9 3626 glibc-thread rp 1.280 15168 21.66 0.03 9 3627 rocksdb rp 03.88 94612 3.31 0.88 0 20807 rocksdb rp 03.80 94732 3.24 0.87 0 20837 rocksdb rp 03.75 94708 3.22 0.85 0 20836 rocksdb rp 03.77 94688 3.23 0.86 0 20818 rocksdb rp 03.74 93644 3.20 0.85 0 20566 rocksdb rp 03.74 94700 3.28 0.77 0 20826 rocksdb rp 03.73 93616 3.21 0.83 1 20560 rocksdb rp 03.74 93628 3.14 0.93 0 20554 rocksdb rp 03.75 93688 3.26 0.80 0 20570 rocksdb rp 03.70 93740 3.13 0.88 0 20587 real 10m24.641s user 32m36.512s sys 1m9.004s ``` #### 部分使用 `MAP_POPULATE` 的版本 ```shell #------------------------------------------------------------------ # test alloc time rss user sys page-faults page-reclaims cfrac rp 03.03 4068 3.03 0.00 0 744 cfrac rp 03.01 4012 3.01 0.00 0 744 cfrac rp 03.02 4064 3.02 0.00 0 745 cfrac rp 03.03 4020 3.03 0.00 0 746 cfrac rp 03.05 3992 3.04 0.00 0 742 cfrac rp 03.02 4020 3.02 0.00 0 743 cfrac rp 03.03 3992 3.03 0.00 0 743 cfrac rp 03.01 4040 3.01 0.00 0 744 cfrac rp 03.02 3988 3.01 0.00 0 742 cfrac rp 03.02 3996 3.02 0.00 0 744 espresso rp 03.21 7888 3.19 0.01 0 1776 espresso rp 03.14 7888 3.13 0.00 0 1777 espresso rp 03.16 7888 3.15 0.00 0 1779 espresso rp 03.17 7888 3.16 0.01 0 1778 espresso rp 03.16 7888 3.16 0.00 0 1779 espresso rp 03.14 7888 3.14 0.00 0 1777 espresso rp 03.17 7888 3.15 0.02 0 1777 espresso rp 03.13 7888 3.12 0.00 0 1777 espresso rp 03.19 7888 3.18 0.00 0 1776 espresso rp 03.16 7888 3.15 0.00 0 1777 barnes rp 02.41 504656 2.32 0.08 0 125756 barnes rp 02.43 504660 2.34 0.08 0 125756 barnes rp 02.41 504656 2.33 0.08 0 125756 barnes rp 02.43 504596 2.34 0.08 0 125756 barnes rp 02.42 504596 2.33 0.08 0 125755 barnes rp 02.42 504660 2.34 0.08 0 125754 barnes rp 02.43 504516 2.34 0.08 0 125752 barnes rp 02.42 504524 2.33 0.08 0 125753 barnes rp 02.41 504520 2.32 0.08 0 125753 barnes rp 02.42 504592 2.34 0.08 0 125755 redis rp 2.560 9968 0.09 0.04 0 1795 redis rp 2.579 9980 0.11 0.01 0 1793 redis rp 2.560 9996 0.11 0.02 0 1796 redis rp 2.579 9952 0.12 0.01 0 1795 redis rp 2.579 10000 0.11 0.02 0 1795 redis rp 2.520 9968 0.10 0.02 0 1797 redis rp 2.619 10036 0.11 0.02 0 1795 redis rp 3.160 9964 0.10 0.06 0 1794 redis rp 2.700 9964 0.12 0.01 0 1793 redis rp 2.700 10032 0.12 0.01 0 1796 larsonN-sized rp 3.559 143216 53.79 0.34 0 35280 larsonN-sized rp 3.543 144664 54.36 0.16 0 35638 larsonN-sized rp 3.525 145772 54.32 0.26 0 35918 larsonN-sized rp 3.544 147620 54.20 0.23 0 36378 larsonN-sized rp 3.592 147380 54.43 0.15 0 36317 larsonN-sized rp 3.540 149304 54.46 0.16 1 36803 larsonN-sized rp 3.526 145324 54.30 0.20 0 35806 larsonN-sized rp 3.590 147836 54.14 0.29 0 36434 larsonN-sized rp 3.535 145068 54.33 0.18 0 35734 larsonN-sized rp 3.515 143020 54.34 0.20 0 35230 mstressN rp 00.84 446672 5.19 0.66 0 294366 mstressN rp 00.84 458188 5.13 0.71 0 297228 mstressN rp 00.84 445188 5.15 0.70 0 294131 mstressN rp 00.84 430436 5.24 0.67 0 290342 mstressN rp 00.84 452616 5.23 0.63 0 295845 mstressN rp 00.84 432192 5.17 0.66 0 290810 mstressN rp 00.85 445976 5.21 0.68 0 294409 mstressN rp 00.83 468344 5.26 0.67 0 299776 mstressN rp 00.82 462600 5.21 0.70 0 298323 mstressN rp 00.82 443196 5.22 0.68 0 293527 rptestN rp .674 111472 1.47 0.23 0 27564 rptestN rp .624 110228 1.38 0.22 0 27250 rptestN rp .634 110176 1.38 0.20 0 27252 rptestN rp .657 110692 1.37 0.25 0 27386 rptestN rp .665 110660 1.40 0.22 0 27363 rptestN rp .638 109552 1.38 0.24 0 27086 rptestN rp .616 114868 1.30 0.22 0 28418 rptestN rp .663 112136 1.50 0.11 1 27731 rptestN rp .672 110580 1.44 0.23 0 27342 rptestN rp .627 110476 1.37 0.24 0 27317 gs rp 00.75 43964 0.73 0.02 0 7792 gs rp 00.76 43900 0.75 0.01 0 7791 gs rp 00.76 44000 0.75 0.01 0 7792 gs rp 00.75 44008 0.73 0.02 0 7792 gs rp 00.76 43884 0.74 0.01 0 7790 gs rp 00.76 43964 0.75 0.01 0 7795 gs rp 00.75 43928 0.73 0.01 0 7792 gs rp 00.77 43972 0.75 0.02 0 7793 gs rp 00.76 43996 0.74 0.02 0 7790 gs rp 00.77 43960 0.76 0.01 0 7792 lua rp 03.40 76868 3.12 0.28 0 201329 lua rp 03.48 76816 3.08 0.39 0 201335 lua rp 03.43 76876 3.17 0.25 0 201303 lua rp 03.45 76816 3.15 0.29 0 201370 lua rp 03.45 76832 3.12 0.32 0 201295 lua rp 03.43 76824 3.15 0.28 0 201442 lua rp 03.45 76860 3.16 0.28 0 201343 lua rp 03.46 76880 3.15 0.30 0 201374 lua rp 03.45 76756 3.14 0.30 0 201303 lua rp 03.45 76820 3.15 0.29 0 201416 alloc-test1 rp 02.80 12888 2.80 0.00 0 2991 alloc-test1 rp 02.73 12896 2.73 0.00 0 2988 alloc-test1 rp 02.71 12904 2.71 0.00 0 2990 alloc-test1 rp 02.74 12892 2.74 0.00 0 2988 alloc-test1 rp 02.75 12912 2.75 0.00 0 2989 alloc-test1 rp 02.74 12920 2.74 0.00 0 2992 alloc-test1 rp 02.71 12892 2.71 0.00 0 2991 alloc-test1 rp 02.73 12896 2.73 0.00 0 2991 alloc-test1 rp 02.72 12896 2.72 0.00 0 2989 alloc-test1 rp 02.73 12900 2.72 0.00 0 2989 alloc-testN rp 03.18 20244 37.08 0.04 0 4609 alloc-testN rp 03.18 20268 37.46 0.02 0 4611 alloc-testN rp 03.23 20256 37.42 0.04 0 4608 alloc-testN rp 03.24 20248 37.85 0.01 0 4608 alloc-testN rp 03.25 20268 37.66 0.09 0 4613 alloc-testN rp 03.23 20240 37.65 0.05 0 4610 alloc-testN rp 03.26 20240 37.66 0.01 0 4609 alloc-testN rp 03.24 20240 37.75 0.05 0 4608 alloc-testN rp 03.26 20256 37.67 0.14 0 4613 alloc-testN rp 03.26 20248 37.78 0.07 0 4612 sh6benchN rp 00.21 251380 2.24 0.08 0 62646 sh6benchN rp 00.22 251380 2.25 0.07 0 62647 sh6benchN rp 00.21 251380 2.19 0.11 0 62647 sh6benchN rp 00.22 251380 2.16 0.13 0 62648 sh6benchN rp 00.22 251380 2.32 0.06 0 62647 sh6benchN rp 00.23 251380 2.33 0.10 0 62648 sh6benchN rp 00.21 251380 2.23 0.08 0 62648 sh6benchN rp 00.22 251380 2.27 0.10 0 62647 sh6benchN rp 00.22 251380 2.20 0.10 0 62647 sh6benchN rp 00.22 251380 2.24 0.09 0 62648 sh8benchN rp 00.53 157528 5.58 0.04 0 39254 sh8benchN rp 00.52 156704 5.52 0.05 0 39044 sh8benchN rp 00.54 163304 5.88 0.05 0 40689 sh8benchN rp 00.53 159672 5.54 0.05 0 39777 sh8benchN rp 00.53 159072 5.65 0.03 0 39650 sh8benchN rp 00.53 157144 5.53 0.04 0 39157 sh8benchN rp 00.53 156280 5.53 0.05 0 38930 sh8benchN rp 00.53 163768 5.58 0.07 0 40805 sh8benchN rp 00.52 159928 5.58 0.03 0 39842 sh8benchN rp 00.52 160016 5.44 0.05 0 39876 xmalloc-testN rp 0.471 68816 46.25 4.60 1 17017 xmalloc-testN rp 0.462 75728 42.69 4.05 0 18745 xmalloc-testN rp 0.542 79888 42.11 4.11 1 19785 xmalloc-testN rp 0.424 75988 43.07 4.09 0 18812 xmalloc-testN rp 0.449 81808 42.74 3.99 1 20267 xmalloc-testN rp 0.483 74640 42.56 4.15 2 18476 xmalloc-testN rp 0.364 69584 44.29 3.74 1 17210 xmalloc-testN rp 0.433 76752 43.22 4.03 1 19002 xmalloc-testN rp 0.458 80404 43.02 3.96 1 19914 xmalloc-testN rp 0.527 86864 40.50 3.63 1 21528 cache-scratch1 rp 00.94 4932 0.94 0.00 0 568 cache-scratch1 rp 00.93 4876 0.92 0.00 0 566 cache-scratch1 rp 00.91 4896 0.91 0.00 0 568 cache-scratch1 rp 00.91 4908 0.91 0.00 0 568 cache-scratch1 rp 00.92 4856 0.91 0.00 0 568 cache-scratch1 rp 00.93 4860 0.93 0.00 0 567 cache-scratch1 rp 00.91 4908 0.91 0.00 0 568 cache-scratch1 rp 00.92 4928 0.92 0.00 0 566 cache-scratch1 rp 00.93 4876 0.93 0.00 0 566 cache-scratch1 rp 00.92 4880 0.92 0.00 0 568 cache-scratchN rp 00.19 4884 2.26 0.00 0 592 cache-scratchN rp 00.19 4900 2.28 0.00 0 590 cache-scratchN rp 00.19 4940 2.27 0.00 0 589 cache-scratchN rp 00.19 4892 2.28 0.00 0 589 cache-scratchN rp 00.20 4872 2.28 0.00 0 590 cache-scratchN rp 00.19 4952 2.29 0.00 0 589 cache-scratchN rp 00.19 4956 2.29 0.00 0 591 cache-scratchN rp 00.19 4920 2.29 0.00 0 590 cache-scratchN rp 00.19 4960 2.29 0.00 0 590 cache-scratchN rp 00.20 4940 2.30 0.00 0 588 glibc-simple rp 01.99 2996 1.98 0.00 0 612 glibc-simple rp 01.93 3000 1.93 0.00 0 615 glibc-simple rp 01.86 2996 1.85 0.00 0 612 glibc-simple rp 01.85 2996 1.85 0.00 0 613 glibc-simple rp 01.86 2996 1.86 0.00 0 611 glibc-simple rp 01.86 2996 1.86 0.00 0 611 glibc-simple rp 01.86 2996 1.85 0.00 0 614 glibc-simple rp 01.90 2996 1.89 0.00 0 612 glibc-simple rp 01.85 2996 1.85 0.00 0 612 glibc-simple rp 01.89 2996 1.88 0.00 0 612 glibc-thread rp 1.153 15164 23.74 0.01 10 3627 glibc-thread rp 1.254 15164 21.65 0.09 9 3625 glibc-thread rp 1.264 15164 21.61 0.08 9 3627 glibc-thread rp 1.262 15164 21.63 0.04 8 3629 glibc-thread rp 1.265 15164 21.68 0.00 8 3629 glibc-thread rp 1.263 15164 21.66 0.03 9 3628 glibc-thread rp 1.268 15164 21.68 0.00 8 3628 glibc-thread rp 1.265 15164 21.71 0.00 9 3625 glibc-thread rp 1.263 15164 21.68 0.00 9 3628 glibc-thread rp 1.276 15164 21.66 0.03 9 3627 rocksdb rp 03.88 94740 3.32 0.88 0 20833 rocksdb rp 03.75 94620 3.15 0.91 0 20811 rocksdb rp 03.73 94740 3.23 0.82 0 20830 rocksdb rp 03.67 94716 3.05 0.94 0 20827 rocksdb rp 03.72 94700 3.13 0.90 0 20831 rocksdb rp 03.70 93728 3.10 0.92 0 20572 rocksdb rp 03.76 93588 3.18 0.89 0 20551 rocksdb rp 03.74 94704 3.25 0.80 0 20825 rocksdb rp 03.77 94704 3.20 0.89 0 20826 rocksdb rp 03.71 94656 3.19 0.84 0 20822 real 10m24.577s user 32m28.702s sys 1m7.993s ``` #### 全部使用 `MAP_POPULATE` 的版本 ```shell #------------------------------------------------------------------ # test alloc time rss user sys page-faults page-reclaims cfrac rp 03.02 6836 3.02 0.00 0 1570 cfrac rp 03.05 6828 3.05 0.00 0 1569 cfrac rp 03.03 6812 3.03 0.00 0 1567 cfrac rp 03.07 6820 3.06 0.00 0 1570 cfrac rp 03.01 6828 3.01 0.00 0 1570 cfrac rp 03.03 6812 3.02 0.00 0 1570 cfrac rp 03.05 6820 3.04 0.00 0 1568 cfrac rp 03.04 6824 3.04 0.00 0 1568 cfrac rp 03.03 6804 3.03 0.00 0 1565 cfrac rp 03.07 6820 3.06 0.00 0 1567 espresso rp 03.17 15276 3.15 0.02 0 3638 espresso rp 03.17 15276 3.16 0.00 0 3637 espresso rp 03.16 15276 3.14 0.02 0 3637 espresso rp 03.17 15276 3.16 0.01 0 3637 espresso rp 03.14 15276 3.12 0.01 0 3638 espresso rp 03.17 15276 3.15 0.02 0 3637 espresso rp 03.14 15276 3.14 0.00 0 3637 espresso rp 03.17 15276 3.16 0.01 0 3635 espresso rp 03.17 15280 3.16 0.01 0 3639 espresso rp 03.18 15276 3.16 0.00 0 3637 barnes rp 02.42 508408 2.34 0.08 0 126792 barnes rp 02.43 508484 2.34 0.08 0 126796 barnes rp 02.43 508408 2.35 0.08 0 126793 barnes rp 02.43 508436 2.33 0.09 0 126796 barnes rp 02.41 508480 2.32 0.08 0 126797 barnes rp 02.42 508516 2.33 0.08 0 126796 barnes rp 02.42 508412 2.34 0.07 0 126794 barnes rp 02.44 508436 2.36 0.08 0 126795 barnes rp 04.51 508428 4.43 0.08 0 126795 barnes rp 02.45 508480 2.36 0.08 0 126796 redis rp 2.660 17704 0.12 0.01 0 3724 redis rp 2.680 17672 0.12 0.02 0 3725 redis rp 2.579 17664 0.10 0.03 0 3726 redis rp 2.619 17704 0.12 0.01 0 3726 redis rp 2.720 17732 0.12 0.01 0 3726 redis rp 2.640 17664 0.11 0.02 0 3723 redis rp 3.180 17676 0.12 0.03 0 3724 redis rp 2.560 17688 0.12 0.00 0 3727 redis rp 2.700 17716 0.12 0.01 0 3724 redis rp 2.579 17696 0.10 0.02 0 3724 larsonN-sized rp 3.470 186084 54.30 0.37 0 46132 larsonN-sized rp 3.535 186200 54.31 0.34 0 46020 larsonN-sized rp 3.493 177636 54.52 0.19 0 44011 larsonN-sized rp 3.544 185612 54.40 0.19 0 46011 larsonN-sized rp 3.510 185832 54.19 0.20 0 46070 larsonN-sized rp 3.500 173432 54.39 0.19 0 42961 larsonN-sized rp 3.504 169260 54.28 0.14 0 41918 larsonN-sized rp 3.498 181764 54.16 0.14 0 45045 larsonN-sized rp 3.514 177488 54.32 0.19 0 43979 larsonN-sized rp 3.566 172972 54.38 0.16 1 42858 mstressN rp 00.87 499184 5.15 0.62 0 307486 mstressN rp 00.86 486440 5.14 0.59 0 304331 mstressN rp 00.87 486640 5.13 0.58 0 304362 mstressN rp 00.86 445036 5.13 0.58 0 293950 mstressN rp 00.86 461480 5.11 0.59 0 298128 mstressN rp 00.86 465840 5.14 0.58 0 299151 mstressN rp 00.86 494760 5.15 0.60 0 306445 mstressN rp 00.85 486700 5.20 0.60 0 304338 mstressN rp 00.85 515828 5.08 0.62 0 311616 mstressN rp 00.85 486640 5.13 0.61 0 304360 rptestN rp .774 244920 1.40 0.23 0 60921 rptestN rp .666 224104 1.24 0.16 0 55717 rptestN rp .645 203300 1.24 0.18 0 50518 rptestN rp .704 228256 1.32 0.20 0 56756 rptestN rp .653 211640 1.22 0.17 0 52596 rptestN rp .638 207464 1.25 0.14 0 51554 rptestN rp .718 240748 1.31 0.19 0 59879 rptestN rp .715 224120 1.31 0.18 0 55719 rptestN rp .652 207472 1.18 0.20 0 51561 rptestN rp .718 219948 1.31 0.24 0 54676 gs rp 00.75 49952 0.72 0.02 0 9334 gs rp 00.76 49912 0.74 0.02 0 9331 gs rp 00.75 49916 0.73 0.02 0 9336 gs rp 00.76 49928 0.75 0.01 0 9334 gs rp 00.76 49964 0.75 0.00 0 9333 gs rp 00.77 49900 0.74 0.02 0 9334 gs rp 00.76 49908 0.74 0.02 0 9335 gs rp 00.75 49880 0.73 0.02 0 9331 gs rp 00.76 49808 0.73 0.02 0 9332 gs rp 00.76 49996 0.74 0.01 0 9333 lua rp 03.57 93160 3.10 0.47 0 389684 lua rp 03.61 93156 3.17 0.43 0 389664 lua rp 03.59 93152 3.18 0.40 0 389690 lua rp 03.61 93152 3.22 0.38 0 389674 lua rp 03.62 93148 3.16 0.46 0 389681 lua rp 03.60 93096 3.17 0.42 0 389660 lua rp 03.62 93148 3.17 0.44 0 389680 lua rp 03.63 93148 3.14 0.48 0 389692 lua rp 03.59 93148 3.18 0.40 0 389686 lua rp 03.61 93148 3.20 0.40 0 389673 alloc-test1 rp 02.82 20280 2.81 0.01 0 4774 alloc-test1 rp 02.72 20296 2.71 0.00 0 4774 alloc-test1 rp 02.75 20280 2.74 0.00 0 4775 alloc-test1 rp 02.69 20296 2.68 0.00 0 4776 alloc-test1 rp 02.68 20304 2.68 0.00 0 4774 alloc-test1 rp 02.70 20304 2.69 0.00 0 4773 alloc-test1 rp 02.72 20308 2.70 0.01 0 4773 alloc-test1 rp 02.72 20296 2.72 0.00 0 4774 alloc-test1 rp 02.72 20296 2.72 0.00 0 4776 alloc-test1 rp 02.71 20280 2.71 0.00 0 4776 alloc-testN rp 03.19 108420 37.08 0.05 0 26647 alloc-testN rp 03.22 108448 37.37 0.07 0 26648 alloc-testN rp 03.23 108416 37.31 0.05 0 26647 alloc-testN rp 03.28 108412 37.90 0.04 0 26646 alloc-testN rp 03.24 108388 37.38 0.05 0 26647 alloc-testN rp 03.23 108480 37.38 0.06 0 26648 alloc-testN rp 03.26 108452 37.79 0.07 0 26648 alloc-testN rp 03.40 108436 37.81 0.07 0 26646 alloc-testN rp 03.44 108436 37.76 0.02 0 26645 alloc-testN rp 03.26 108392 37.76 0.05 0 26648 sh6benchN rp 00.25 307548 2.29 0.08 0 76729 sh6benchN rp 00.24 307548 2.43 0.07 0 76730 sh6benchN rp 00.25 307532 2.45 0.06 0 76730 sh6benchN rp 00.24 307548 2.41 0.06 0 76730 sh6benchN rp 00.23 307508 2.34 0.06 0 76729 sh6benchN rp 00.24 307548 2.47 0.05 0 76728 sh6benchN rp 00.23 307548 2.36 0.05 0 76728 sh6benchN rp 00.25 307548 2.46 0.05 0 76730 sh6benchN rp 00.23 307508 2.31 0.08 0 76730 sh6benchN rp 00.23 307548 2.31 0.09 0 76729 sh8benchN rp 00.56 294240 5.87 0.07 0 73400 sh8benchN rp 00.58 298360 6.01 0.05 0 74436 sh8benchN rp 00.58 298376 5.99 0.06 0 74436 sh8benchN rp 00.57 298360 6.13 0.06 0 74436 sh8benchN rp 00.57 302560 6.00 0.08 0 75476 sh8benchN rp 00.56 294240 5.93 0.05 0 73397 sh8benchN rp 00.58 298344 5.96 0.07 0 74437 sh8benchN rp 00.56 294208 5.87 0.05 0 73396 sh8benchN rp 00.56 294192 5.94 0.09 0 73396 sh8benchN rp 00.55 298360 5.89 0.05 0 74438 xmalloc-testN rp 0.512 108008 45.63 4.94 3 26813 xmalloc-testN rp 0.519 112180 42.11 4.43 1 27858 xmalloc-testN rp 0.451 108016 42.61 4.15 3 26816 xmalloc-testN rp 0.511 120488 42.17 4.21 3 29932 xmalloc-testN rp 0.523 108016 41.99 4.34 3 26813 xmalloc-testN rp 0.518 108008 42.29 4.13 1 26813 xmalloc-testN rp 0.525 112152 42.10 4.16 3 27857 xmalloc-testN rp 0.453 120472 42.88 4.15 2 29933 xmalloc-testN rp 0.468 116340 42.71 3.93 7 28894 xmalloc-testN rp 0.545 108016 42.19 4.12 2 26817 cache-scratch1 rp 00.94 7756 0.93 0.00 0 1620 cache-scratch1 rp 00.96 7756 0.96 0.00 0 1622 cache-scratch1 rp 00.95 7732 0.95 0.00 0 1620 cache-scratch1 rp 00.91 7728 0.91 0.00 0 1622 cache-scratch1 rp 00.93 7732 0.93 0.00 0 1621 cache-scratch1 rp 00.92 7756 0.92 0.00 0 1622 cache-scratch1 rp 00.91 7744 0.91 0.00 0 1622 cache-scratch1 rp 00.92 7760 0.92 0.00 0 1623 cache-scratch1 rp 00.92 7752 0.92 0.00 0 1620 cache-scratch1 rp 00.92 7732 0.92 0.00 0 1621 cache-scratchN rp 00.19 8668 2.27 0.00 0 1644 cache-scratchN rp 00.19 8692 2.28 0.00 0 1644 cache-scratchN rp 00.19 8692 2.28 0.00 0 1642 cache-scratchN rp 00.19 8656 2.29 0.00 0 1642 cache-scratchN rp 00.19 8668 2.28 0.00 0 1643 cache-scratchN rp 00.19 8660 2.28 0.00 0 1643 cache-scratchN rp 00.19 8684 2.28 0.00 0 1642 cache-scratchN rp 00.19 8664 2.29 0.00 0 1643 cache-scratchN rp 00.19 8668 2.28 0.00 0 1643 cache-scratchN rp 00.19 8664 2.29 0.00 0 1644 glibc-simple rp 01.92 10708 1.91 0.01 0 2593 glibc-simple rp 01.93 10708 1.93 0.00 0 2592 glibc-simple rp 01.96 10704 1.96 0.00 0 2594 glibc-simple rp 01.96 10708 1.95 0.00 0 2594 glibc-simple rp 01.91 10708 1.91 0.00 0 2594 glibc-simple rp 01.96 10708 1.96 0.00 0 2595 glibc-simple rp 01.91 10708 1.91 0.00 0 2595 glibc-simple rp 01.93 10704 1.92 0.00 0 2594 glibc-simple rp 01.90 10688 1.90 0.00 0 2594 glibc-simple rp 01.89 10708 1.89 0.00 0 2595 glibc-thread rp 1.177 106896 23.57 0.07 11 26578 glibc-thread rp 1.280 106896 21.58 0.07 9 26579 glibc-thread rp 1.284 106896 21.53 0.07 8 26578 glibc-thread rp 1.281 106900 21.53 0.07 10 26579 glibc-thread rp 1.288 106896 21.55 0.06 9 26578 glibc-thread rp 1.286 106896 21.52 0.08 9 26579 glibc-thread rp 1.287 106896 21.56 0.06 9 26579 glibc-thread rp 1.293 106896 21.57 0.05 8 26579 glibc-thread rp 1.288 106896 21.58 0.03 10 26581 glibc-thread rp 1.285 106896 21.53 0.09 8 26579 rocksdb rp 03.88 140080 3.33 0.88 0 32150 rocksdb rp 03.77 140076 3.16 0.93 0 32150 rocksdb rp 03.74 140036 3.19 0.86 0 32151 rocksdb rp 03.79 140020 3.17 0.92 0 32151 rocksdb rp 03.76 140008 3.14 0.93 0 32150 rocksdb rp 03.77 140056 3.18 0.90 0 32150 rocksdb rp 03.74 140060 3.10 0.95 0 32153 rocksdb rp 03.76 140044 3.20 0.86 0 32153 rocksdb rp 03.75 140076 3.23 0.83 0 32153 rocksdb rp 03.73 140040 3.05 0.99 0 32150 real 10m30.664s user 32m30.087s sys 1m10.958s ``` --- ### 測試 v2 在這次的測試中,使用了 perf 這個工具來協助測量 minor page-fault ,原本的 mimalloc -bench 測試所提供的僅僅只有 major page-fault ,因此用 perf 執行他們的測試腳本可以更加的準確一些 測試命令為 ```shll $ perf stat -e page-faults,minor-faults,major-faults,instructions,context-switches ../../bench.sh -j=12 -n=20 rp allt ``` #### 原始的版本 ```shell Performance counter stats for '../../bench.sh -j=12 -n=20 rp allt': 15,226,492 page-faults 15,226,157 minor-faults 335 major-faults 21,790,811,517,892 instructions 20,492,454 context-switches 1241.559631901 seconds time elapsed 4095.979562000 seconds user 198.381062000 seconds sys ``` #### 部份使用 `MAP_POPULATE` 的版本 ```shell Performance counter stats for '../../bench.sh -j=12 -n=20 rp allt': 10,774,036 page-faults 10,773,726 minor-faults 310 major-faults 21,781,457,800,834 instructions 18,838,914 context-switches 1240.991562898 seconds time elapsed 4088.139776000 seconds user 186.955651000 seconds sys ``` #### 全部使用 `MAP_POPULATE` 的版本 ```shell Performance counter stats for '../../bench.sh -j=12 -n=20 rp allt': 3,110,504 page-faults 3,110,176 minor-faults 328 major-faults 21,103,286,351,616 instructions 18,772,386 context-switches 1251.572957427 seconds time elapsed 3896.964244000 seconds user 180.793281000 seconds sys ``` --- ## mimalloc-bench ( arm64 ) ### 測試 v1 目前使用的設備 m1 macbook 搭配 docker 上跑 ubuntu 22.04 ( 6 cores, 6 GB memory) #### 原始的版本 ```shell #------------------------------------------------------------------ # test alloc time rss user sys page-faults page-reclaims cfrac sys 03.73 2696 3.72 0.01 0 394 cfrac rp 03.28 3468 3.28 0.00 0 708 cfrac mi 03.18 2740 3.17 0.00 0 337 cfrac tc 03.25 7652 3.24 0.01 0 1331 espresso sys 03.86 2264 3.85 0.00 0 297 espresso rp 03.42 7828 3.40 0.02 0 1797 espresso mi 03.41 3920 3.39 0.01 0 1306 espresso tc 03.40 8352 3.39 0.01 0 1487 barnes sys 01.87 57864 1.82 0.05 0 16529 barnes rp 01.84 59096 1.81 0.02 0 16894 barnes mi 01.85 58008 1.82 0.02 0 16541 barnes tc 01.84 63048 1.81 0.03 0 17523 redis sys 5.339 7224 0.24 0.05 0 1286 redis rp 4.760 8900 0.21 0.06 0 2788 redis mi 4.839 7052 0.22 0.05 0 1257 redis tc 4.860 12556 0.23 0.05 0 2430 larsonN-sized sys 7.663 52292 29.75 0.15 0 12567 larsonN-sized rp 5.258 70708 29.82 0.13 0 17281 larsonN-sized mi 4.605 84836 29.82 0.15 0 20615 larsonN-sized tc 4.631 56132 29.84 0.15 0 13414 mstressN sys 00.55 162360 0.91 0.51 0 145863 mstressN rp 00.36 202788 0.74 0.32 0 140758 mstressN mi 00.25 209868 0.71 0.14 0 52302 mstressN tc 00.27 99372 0.84 0.10 0 24683 rptestN sys 1.396 21460 1.21 1.46 0 11059 rptestN rp .500 72816 0.91 1.07 0 18038 rptestN mi .575 62360 0.89 1.21 0 31362 rptestN tc .566 42640 1.02 1.02 1 10075 gs sys 00.72 38532 0.67 0.04 0 7258 gs rp 00.70 41232 0.68 0.02 0 7588 gs mi 00.69 41088 0.67 0.02 0 6971 gs tc 00.69 44896 0.66 0.03 0 7905 lua sys 03.54 58824 2.97 0.57 0 157012 lua rp 03.55 77756 2.88 0.67 0 214069 lua mi 03.45 71476 2.88 0.57 0 160210 lua tc 03.72 69788 2.96 0.76 0 266691 alloc-test1 sys 03.43 12184 3.43 0.00 0 2885 alloc-test1 rp 03.37 12372 3.36 0.00 0 2949 alloc-test1 mi 02.86 12256 2.86 0.00 0 2527 alloc-test1 tc 02.89 15544 2.88 0.00 0 3315 alloc-testN sys 04.17 13656 24.84 0.02 0 3218 alloc-testN rp 03.64 16496 21.71 0.01 0 3793 alloc-testN mi 03.50 13560 20.88 0.01 0 2864 alloc-testN tc 03.63 17020 21.54 0.01 0 3686 sh6benchN sys 01.56 340860 4.72 0.74 0 84959 sh6benchN rp 00.31 247392 1.45 0.12 0 61714 sh6benchN mi 00.27 213248 1.30 0.11 0 53040 sh6benchN tc 00.33 218916 1.66 0.14 0 54157 Command exited with non-zero status 88 sh8benchN sys 02.90 166640 15.14 0.65 0 245965 Command exited with non-zero status 88 sh8benchN rp 00.70 149612 3.70 0.08 0 37304 Command exited with non-zero status 88 sh8benchN mi 00.63 132704 3.34 0.07 0 32977 Command exited with non-zero status 88 sh8benchN tc 06.40 127360 19.13 14.78 0 31253 xmalloc-testN sys 2.571 60880 26.62 1.16 0 87366 xmalloc-testN rp 0.333 113020 28.76 0.61 0 28099 xmalloc-testN mi 0.468 79876 28.60 0.54 0 28662 xmalloc-testN tc 7.071 40876 10.45 15.34 0 9622 cache-scratch1 sys 01.20 3140 1.20 0.00 0 174 cache-scratch1 rp 01.20 4308 1.20 0.00 0 527 cache-scratch1 mi 01.20 3424 1.20 0.00 0 191 cache-scratch1 tc 01.20 7144 1.20 0.00 0 1125 cache-scratchN sys 00.29 3204 1.65 0.00 0 191 cache-scratchN rp 00.28 4352 1.63 0.00 0 538 cache-scratchN mi 00.28 3464 1.63 0.00 0 203 cache-scratchN tc 00.28 7184 1.66 0.00 0 1137 glibc-simple sys 02.49 1444 2.48 0.00 0 178 glibc-simple rp 01.57 2644 1.57 0.00 0 588 glibc-simple mi 01.52 1832 1.52 0.00 0 208 glibc-simple tc 01.55 6872 1.54 0.00 0 1206 glibc-thread sys 2.352 2752 11.98 0.00 4 436 glibc-thread rp 1.642 8760 11.93 0.00 3 2053 glibc-thread mi 1.479 3328 11.99 0.00 3 558 glibc-thread tc 2.231 8504 11.99 0.00 1 1558 rocksdb sys 04.30 87244 3.22 1.37 0 36277 rocksdb rp 04.23 89952 3.21 1.27 0 19975 rocksdb mi 04.16 97728 3.18 1.25 0 21740 rocksdb tc 04.14 94032 3.10 1.30 0 20797 larsonN sys 8.430 51016 29.75 0.15 0 12250 larsonN rp 5.421 70976 29.83 0.14 0 17347 larsonN mi 4.692 81660 29.81 0.16 0 19827 larsonN tc 4.738 55380 29.78 0.15 0 13227 malloc-large sys 01.62 533640 0.57 1.04 0 510535 malloc-large rp 14.49 410280 1.35 13.13 0 7784547 malloc-large mi 01.04 780032 0.52 0.51 0 194356 malloc-large tc 00.81 575524 0.50 0.30 0 185027 mleak10 sys 00.15 1660 0.05 0.30 0 6173 mleak10 rp 00.11 2844 0.05 0.24 0 6546 mleak10 mi 00.10 1868 0.05 0.25 0 6193 mleak10 tc 00.11 6900 0.04 0.26 0 7167 mleak100 sys 01.07 1772 0.39 2.61 0 60201 mleak100 rp 01.06 2828 0.44 2.50 0 60556 mleak100 mi 01.07 2100 0.56 2.52 0 60256 mleak100 tc 01.07 6892 0.44 2.56 1 61168 rbstress1 sys 03.16 127888 3.07 0.08 0 31817 rbstress1 rp 02.97 134132 2.86 0.10 0 32855 rbstress1 mi 02.83 116432 2.77 0.05 0 32594 rbstress1 tc 02.91 115844 2.84 0.06 0 27686 rbstressN sys 03.35 123264 3.29 0.06 0 32954 rbstressN rp 03.08 151232 2.99 0.09 0 38004 rbstressN mi 03.00 130296 2.93 0.07 0 33464 rbstressN tc 03.10 95560 3.05 0.05 0 22631 cache-thrash1 sys 01.20 3140 1.20 0.00 0 176 cache-thrash1 rp 01.20 4324 1.20 0.00 0 526 cache-thrash1 mi 01.20 3424 1.20 0.00 0 193 cache-thrash1 tc 01.20 7140 1.20 0.00 0 1124 cache-thrashN sys 00.29 3180 1.68 0.00 0 186 cache-thrashN rp 00.30 4336 1.66 0.00 0 540 cache-thrashN mi 00.30 3460 1.66 0.00 0 201 cache-thrashN tc 00.30 7168 1.68 0.00 0 1137 ``` #### 部分使用 `MAP_POPULATE` 的版本 ```shell #------------------------------------------------------------------ # test alloc time rss user sys page-faults page-reclaims cfrac sys 03.74 2688 3.73 0.00 0 392 cfrac rp 03.27 3472 3.27 0.00 0 708 cfrac mi 03.18 2744 3.17 0.00 0 337 cfrac tc 03.27 7652 3.26 0.01 0 1329 espresso sys 03.90 2264 3.88 0.02 0 297 espresso rp 03.43 7824 3.41 0.01 0 1796 espresso mi 03.41 3896 3.39 0.01 0 1302 espresso tc 03.41 8356 3.39 0.01 0 1490 barnes sys 01.87 57864 1.82 0.05 0 16530 barnes rp 02.35 503972 1.84 0.50 0 125717 barnes mi 01.89 58004 1.86 0.03 0 16541 barnes tc 01.87 63044 1.84 0.03 0 17521 redis sys 5.239 7240 0.24 0.04 0 1288 redis rp 4.820 8916 0.22 0.05 0 2789 redis mi 4.799 7040 0.22 0.04 0 1258 redis tc 4.920 12576 0.22 0.05 0 2433 larsonN-sized sys 7.637 55528 29.68 0.18 0 13682 larsonN-sized rp 5.256 70076 29.83 0.13 0 17126 larsonN-sized mi 4.845 78932 29.87 0.15 0 19142 larsonN-sized tc 4.481 56888 29.82 0.16 0 13604 mstressN sys 00.46 164472 0.93 0.39 0 125066 mstressN rp 00.35 208104 0.71 0.27 0 143215 mstressN mi 00.25 217160 0.72 0.13 0 54123 mstressN tc 00.26 95920 0.82 0.12 0 23666 rptestN sys 1.391 20456 1.23 1.41 0 10757 rptestN rp .506 74364 0.85 1.14 0 18421 rptestN mi .555 58004 0.97 1.12 0 26548 rptestN tc .511 41812 1.04 0.98 1 9864 gs sys 00.72 38524 0.67 0.05 0 7253 gs rp 00.70 41240 0.67 0.03 0 7589 gs mi 00.70 41120 0.67 0.02 0 6974 gs tc 00.70 44920 0.67 0.02 0 7907 lua sys 03.58 58892 3.04 0.53 0 156843 lua rp 03.58 77772 2.91 0.66 0 214065 lua mi 03.47 71592 2.92 0.55 0 160200 lua tc 03.75 69788 2.94 0.81 0 266693 alloc-test1 sys 03.42 12196 3.41 0.00 0 2887 alloc-test1 rp 03.42 12360 3.42 0.00 0 2950 alloc-test1 mi 02.86 12240 2.86 0.00 0 2528 alloc-test1 tc 02.91 15544 2.90 0.01 0 3315 alloc-testN sys 04.15 13676 24.72 0.02 0 3216 alloc-testN rp 03.65 16500 21.73 0.01 0 3790 alloc-testN mi 03.49 13576 20.83 0.01 0 2864 alloc-testN tc 03.60 16952 21.35 0.01 0 3670 sh6benchN sys 01.43 340852 4.60 0.58 0 84960 sh6benchN rp 00.32 247404 1.43 0.14 0 61716 sh6benchN mi 00.27 213004 1.28 0.12 0 52980 sh6benchN tc 00.35 218552 1.64 0.14 0 54067 Command exited with non-zero status 88 sh8benchN sys 02.95 167476 15.72 0.56 0 188932 Command exited with non-zero status 88 sh8benchN rp 00.72 150440 3.75 0.09 0 37508 Command exited with non-zero status 88 sh8benchN mi 00.63 132788 3.32 0.06 0 32984 Command exited with non-zero status 88 sh8benchN tc 06.47 126140 19.26 15.08 0 30948 xmalloc-testN sys 2.540 62020 26.51 1.21 0 86318 xmalloc-testN rp 0.339 109860 28.61 0.69 1 27314 xmalloc-testN mi 0.471 88732 28.62 0.52 0 30270 xmalloc-testN tc 7.161 40644 10.59 15.15 0 9560 cache-scratch1 sys 01.20 3140 1.20 0.00 0 175 cache-scratch1 rp 01.20 4328 1.20 0.00 0 528 cache-scratch1 mi 01.20 3436 1.20 0.00 0 192 cache-scratch1 tc 01.20 7152 1.20 0.00 0 1125 cache-scratchN sys 00.28 3204 1.63 0.00 0 192 cache-scratchN rp 00.28 4340 1.64 0.00 0 538 cache-scratchN mi 00.28 3440 1.64 0.00 0 202 cache-scratchN tc 00.29 7184 1.64 0.00 0 1136 glibc-simple sys 02.49 1424 2.48 0.00 0 178 glibc-simple rp 01.57 2628 1.57 0.00 0 587 glibc-simple mi 01.51 1832 1.51 0.00 0 208 glibc-simple tc 01.53 6876 1.53 0.00 0 1206 glibc-thread sys 2.423 2752 11.98 0.00 3 436 glibc-thread rp 1.690 8748 11.97 0.00 4 2051 glibc-thread mi 1.522 3328 11.99 0.00 2 560 glibc-thread tc 2.119 8604 11.96 0.00 0 1569 rocksdb sys 04.24 88052 3.25 1.27 0 36319 rocksdb rp 04.15 89980 3.13 1.27 0 19978 rocksdb mi 04.12 97756 3.14 1.25 0 21745 rocksdb tc 04.10 94028 3.11 1.25 0 20799 larsonN sys 8.803 50252 29.73 0.14 0 12611 larsonN rp 5.347 69056 29.84 0.13 0 16871 larsonN mi 4.933 77528 29.87 0.14 0 18786 larsonN tc 4.818 55096 29.78 0.15 0 13156 malloc-large sys 01.39 533636 0.54 0.85 0 510533 malloc-large rp 13.34 411568 0.37 12.96 0 7816549 malloc-large mi 00.99 780032 0.51 0.47 0 194357 malloc-large tc 00.82 573492 0.51 0.31 0 184515 mleak10 sys 00.11 1700 0.03 0.26 0 6183 mleak10 rp 00.10 2840 0.04 0.24 0 6544 mleak10 mi 00.10 1864 0.05 0.25 0 6193 mleak10 tc 00.11 6888 0.03 0.26 0 7164 mleak100 sys 01.07 1764 0.44 2.56 0 60197 mleak100 rp 01.04 2856 0.46 2.46 0 60573 mleak100 mi 01.07 2188 0.57 2.52 0 60273 mleak100 tc 01.07 6908 0.45 2.56 0 61170 rbstress1 sys 03.16 127972 3.09 0.06 0 31837 rbstress1 rp 03.18 163424 2.87 0.31 0 161797 rbstress1 mi 02.84 116436 2.78 0.05 0 32593 rbstress1 tc 02.92 117892 2.86 0.05 0 28199 rbstressN sys 03.25 128852 3.17 0.08 0 34725 rbstressN rp 03.24 181128 2.93 0.31 0 153129 rbstressN mi 02.95 137924 2.88 0.06 0 35649 rbstressN tc 03.02 102676 2.97 0.04 0 24397 cache-thrash1 sys 01.20 3156 1.20 0.00 0 175 cache-thrash1 rp 01.20 4324 1.20 0.00 0 527 cache-thrash1 mi 01.20 3436 1.20 0.00 0 193 cache-thrash1 tc 01.20 7140 1.20 0.00 0 1124 cache-thrashN sys 00.29 3180 1.67 0.00 0 186 cache-thrashN rp 00.29 4352 1.71 0.00 0 540 cache-thrashN mi 00.29 3460 1.67 0.00 0 202 cache-thrashN tc 00.29 7184 1.69 0.00 0 1135 ``` --- ## perf 測試 mimalloc-bench ### x86-64 #### 所有測試 ##### 原本 rpmalloc ```shell Performance counter stats for '../../bench.sh -n=3 rp larson lean-mathlib malloc-large mleak rbstress cthrash z3 spec spec-bench security': 251,876.59 msec task-clock # 2.398 CPUs utilized 42,231 context-switches # 167.665 /sec 2,842 cpu-migrations # 11.283 /sec 25,428,624 page-faults # 100.957 K/sec 1,056,944,455,193 cycles # 4.196 GHz (84.20%) 12,721,727,797 stalled-cycles-frontend # 1.20% frontend cycles idle (84.24%) 8,720,070,083 stalled-cycles-backend # 0.83% backend cycles idle (84.09%) 1,385,858,877,884 instructions # 1.31 insn per cycle # 0.01 stalled cycles per insn (84.16%) 209,437,602,984 branches # 831.509 M/sec (84.07%) 1,003,012,411 branch-misses # 0.48% of all branches (84.18%) 105.031148827 seconds time elapsed 194.266879000 seconds user 35.449753000 seconds sys ``` ##### 使用 `MAP_POPULATE` 的版本 ```shell Performance counter stats for '../../bench.sh -n=3 rp larson lean-mathlib malloc-large mleak rbstress cthrash z3 spec spec-bench security': 254,297.43 msec task-clock # 2.713 CPUs utilized 43,018 context-switches # 169.164 /sec 2,375 cpu-migrations # 9.339 /sec 2,047,877 page-faults # 8.053 K/sec 1,053,405,534,479 cycles # 4.142 GHz (84.16%) 14,002,160,267 stalled-cycles-frontend # 1.33% frontend cycles idle (84.15%) 12,100,289,711 stalled-cycles-backend # 1.15% backend cycles idle (84.23%) 1,465,843,355,831 instructions # 1.39 insn per cycle # 0.01 stalled cycles per insn (84.19%) 214,771,092,232 branches # 844.567 M/sec (84.17%) 1,019,806,619 branch-misses # 0.47% of all branches (84.17%) 93.731708160 seconds time elapsed 211.979468000 seconds user 22.169901000 seconds sys ``` #### malloc-large 測試 ##### 原本 rpmalloc ```shell #------------------------------------------------------------------ # test alloc time rss user sys page-faults page-reclaims malloc-large rp 10.67 410772 0.92 9.73 0 7784584 malloc-large rp 10.59 410764 0.74 9.83 0 7784585 malloc-large rp 10.57 410772 0.97 9.58 0 7784583 Performance counter stats for '../../bench.sh -n=3 rp malloc-large': 31,841.26 msec task-clock # 0.999 CPUs utilized 3,650 context-switches # 114.631 /sec 902 cpu-migrations # 28.328 /sec 23,358,679 page-faults # 733.598 K/sec 144,921,734,914 cycles # 4.551 GHz (83.34%) 166,567,929 stalled-cycles-frontend # 0.11% frontend cycles idle (83.35%) 13,592,631,272 stalled-cycles-backend # 9.38% backend cycles idle (83.34%) 117,114,756,190 instructions # 0.81 insn per cycle # 0.12 stalled cycles per insn (83.34%) 19,518,553,480 branches # 612.996 M/sec (83.33%) 63,827,983 branch-misses # 0.33% of all branches (83.34%) 31.863487556 seconds time elapsed 2.679727000 seconds user 29.159038000 seconds sys ``` ##### 使用 `MAP_POPULATE` 的版本 ```shell #------------------------------------------------------------------ # test alloc time rss user sys page-faults page-reclaims malloc-large rp 06.77 412032 1.59 5.17 0 7816586 malloc-large rp 06.72 412044 1.53 5.17 0 7816584 malloc-large rp 06.69 412052 1.59 5.09 0 7816586 Performance counter stats for '../../bench.sh -n=3 rp malloc-large': 20,189.78 msec task-clock # 0.999 CPUs utilized 2,365 context-switches # 117.138 /sec 592 cpu-migrations # 29.322 /sec 6,653 page-faults # 329.523 /sec 91,308,364,156 cycles # 4.523 GHz (83.37%) 61,869,447 stalled-cycles-frontend # 0.07% frontend cycles idle (83.32%) 12,302,043,444 stalled-cycles-backend # 13.47% backend cycles idle (83.33%) 126,075,131,317 instructions # 1.38 insn per cycle # 0.10 stalled cycles per insn (83.32%) 19,999,719,661 branches # 990.586 M/sec (83.39%) 15,528,823 branch-misses # 0.08% of all branches (83.34%) 20.205873066 seconds time elapsed 4.732901000 seconds user 15.455440000 seconds sys ``` #### 除了 malloc-large 以外的測試 ##### 原本 rpmalloc ```shell Performance counter stats for '../../bench.sh -n=3 rp larson lean-mathlib mleak rbstress cthrash z3 spec spec-bench security allt': 838,529.47 msec task-clock # 3.196 CPUs utilized 2,260,203 context-switches # 2.695 K/sec 337,454 cpu-migrations # 402.435 /sec 4,370,064 page-faults # 5.212 K/sec 3,439,780,021,279 cycles # 4.102 GHz (83.80%) 47,218,822,205 stalled-cycles-frontend # 1.37% frontend cycles idle (83.77%) 14,183,105,502 stalled-cycles-backend # 0.41% backend cycles idle (83.83%) 4,390,808,936,185 instructions # 1.28 insn per cycle # 0.01 stalled cycles per insn (83.86%) 690,709,112,317 branches # 823.715 M/sec (83.84%) 16,901,343,292 branch-misses # 2.45% of all branches (83.84%) 262.334523934 seconds time elapsed 781.460681000 seconds user 34.017872000 seconds sys ``` ##### 使用 `MAP_POPULATE` 的版本 ```shell Performance counter stats for '../../bench.sh -n=3 rp larson lean-mathlib mleak rbstress cthrash z3 spec spec-bench security allt': 870,250.28 msec task-clock # 3.322 CPUs utilized 1,557,513 context-switches # 1.790 K/sec 356,562 cpu-migrations # 409.724 /sec 3,656,478 page-faults # 4.202 K/sec 3,579,230,925,266 cycles # 4.113 GHz (83.85%) 49,062,192,975 stalled-cycles-frontend # 1.37% frontend cycles idle (83.81%) 9,480,764,498 stalled-cycles-backend # 0.26% backend cycles idle (83.79%) 4,554,538,265,441 instructions # 1.27 insn per cycle # 0.01 stalled cycles per insn (83.76%) 705,200,973,298 branches # 810.343 M/sec (83.87%) 17,231,489,503 branch-misses # 2.44% of all branches (83.84%) 261.945424032 seconds time elapsed 818.733718000 seconds user 29.454789000 seconds sys ``` ### ARM64 版本 #### 所有測試 ##### 原本 rpmalloc ```shell Performance counter stats for '../../bench.sh -n=3 rp allt larson lean-mathlib malloc-large mleak rbstress cthrash z3 spec spec-bench security': 579203.96 msec task-clock # 1.815 CPUs utilized 341961 context-switches # 590.398 /sec 34663 cpu-migrations # 59.846 /sec 27154286 page-faults # 46.882 K/sec <not supported> cycles <not supported> instructions <not supported> branches <not supported> branch-misses 319.050415021 seconds time elapsed 489.572905000 seconds user 73.798088000 seconds sys ``` ##### 使用 `MAP_POPULATE` 的版本 ```shell Performance counter stats for '../../bench.sh -n=3 rp allt larson lean-mathlib malloc-large mleak rbstress cthrash z3 spec spec-bench security': 578142.07 msec task-clock # 1.822 CPUs utilized 347318 context-switches # 600.749 /sec 37126 cpu-migrations # 64.216 /sec 3407566 page-faults # 5.894 K/sec <not supported> cycles <not supported> instructions <not supported> branches <not supported> branch-misses 317.231061062 seconds time elapsed 487.113468000 seconds user 73.023404000 seconds sys ``` #### malloc-large 測試 ##### 原本 rpmalloc ```shell #------------------------------------------------------------------ # test alloc time rss user sys page-faults page-reclaims malloc-large rp 15.39 410288 1.36 14.03 0 7784548 malloc-large rp 15.12 410268 1.38 13.74 0 7784548 malloc-large rp 15.08 410280 1.24 13.83 0 7784547 Performance counter stats for '../../bench.sh -n=3 rp malloc-large': 45672.21 msec task-clock # 1.000 CPUs utilized 187 context-switches # 4.094 /sec 8 cpu-migrations # 0.175 /sec 23358903 page-faults # 511.447 K/sec <not supported> cycles <not supported> instructions <not supported> branches <not supported> branch-misses 45.670108104 seconds time elapsed 4.005429000 seconds user 41.670384000 seconds sys ``` ##### 使用 `MAP_POPULATE` 的版本 ```shell #------------------------------------------------------------------ # test alloc time rss user sys page-faults page-reclaims malloc-large rp 13.74 411568 0.41 13.33 0 7816548 malloc-large rp 13.77 411568 0.38 13.39 0 7816548 malloc-large rp 13.76 411564 0.40 13.35 0 7816548 Performance counter stats for '../../bench.sh -n=3 rp malloc-large': 41351.83 msec task-clock # 1.000 CPUs utilized 154 context-switches # 3.724 /sec 7 cpu-migrations # 0.169 /sec 6846 page-faults # 165.555 /sec <not supported> cycles <not supported> instructions <not supported> branches <not supported> branch-misses 41.351039518 seconds time elapsed 1.210233000 seconds user 40.145854000 seconds sys ``` #### 除了 malloc-large 以外的測試 ##### 原本 rpmalloc ```shell Performance counter stats for '../../bench.sh -n=3 rp allt larson lean-mathlib mleak rbstress cthrash z3 spec spec-bench security': 531856.65 msec task-clock # 1.956 CPUs utilized 347771 context-switches # 653.881 /sec 37123 cpu-migrations # 69.799 /sec 3766341 page-faults # 7.081 K/sec <not supported> cycles <not supported> instructions <not supported> branches <not supported> branch-misses 271.930552997 seconds time elapsed 485.217362000 seconds user 31.033840000 seconds sys ``` ##### 使用 `MAP_POPULATE` 的版本 ```shell Performance counter stats for '../../bench.sh -n=3 rp allt larson lean-mathlib mleak rbstress cthrash z3 spec spec-bench security': 535424.72 msec task-clock # 1.946 CPUs utilized 348042 context-switches # 650.030 /sec 35890 cpu-migrations # 67.031 /sec 3372262 page-faults # 6.298 K/sec <not supported> cycles <not supported> instructions <not supported> branches <not supported> branch-misses 275.121388960 seconds time elapsed 486.279093000 seconds user 32.372253000 seconds sys ``` --- ## 使用 except 調整分之狀況後的結果 ### x86-64 ![](https://hackmd.io/_uploads/r1bSDNQdh.png) ![](https://hackmd.io/_uploads/Hk-SwVQun.png) ![](https://hackmd.io/_uploads/rkbHPN7O2.png) ![](https://hackmd.io/_uploads/HkxZBPVm_n.png) ![](https://hackmd.io/_uploads/Sk-SP4Qdh.png) ![](https://hackmd.io/_uploads/B1-rw47_h.png) ### arm64 ![](https://hackmd.io/_uploads/ryhMeYQu3.png) ![](https://hackmd.io/_uploads/rJx2GxKmun.png) ![](https://hackmd.io/_uploads/S12GlYX_n.png) ![](https://hackmd.io/_uploads/rklnMltmd3.png) ![](https://hackmd.io/_uploads/H12MlKQO3.png) ![](https://hackmd.io/_uploads/rJ3MeY7O3.png) ## 與最初版本的比較 ### x86-64 ![](https://hackmd.io/_uploads/SJlN0EuQdh.png) ![](https://hackmd.io/_uploads/HkEA4_7uh.png) ![](https://hackmd.io/_uploads/rk4A4d7O3.png) ![](https://hackmd.io/_uploads/H1N0EOXdn.png) ![](https://hackmd.io/_uploads/SkVREdXuh.png) ![](https://hackmd.io/_uploads/HyxVC4_Xd2.png) ### arm64 ![](https://hackmd.io/_uploads/BJBvrtXO2.png) ![](https://hackmd.io/_uploads/rJBwHKQun.png) ![](https://hackmd.io/_uploads/SkrPHK7_h.png) ![](https://hackmd.io/_uploads/ryHwHYQdn.png) ![](https://hackmd.io/_uploads/SJgSDBt7_h.png) ![](https://hackmd.io/_uploads/rJxHDSYX_h.png)

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully