<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                # Filesystem Performance Benchmarking > 原文:[https://docs.gitlab.com/ee/administration/operations/filesystem_benchmarking.html](https://docs.gitlab.com/ee/administration/operations/filesystem_benchmarking.html) * [Executing benchmarks](#executing-benchmarks) * [Benchmarking with `fio`](#benchmarking-with-fio) * [Simple benchmarking](#simple-benchmarking) # Filesystem Performance Benchmarking[](#filesystem-performance-benchmarking "Permalink") Filesystem performance has a big impact on overall GitLab performance, especially for actions that read or write to Git repositories. This information will help benchmark filesystem performance against known good and bad real-world systems. 通常,在談論文件系統性能時,最大的顧慮是網絡文件系統(NFS). 但是,即使某些本地磁盤也可能具有緩慢的 I / O. 此頁面上的信息可用于兩種情況. ## Executing benchmarks[](#executing-benchmarks "Permalink") ### Benchmarking with `fio`[](#benchmarking-with-fio "Permalink") 我們建議使用[Fio](https://fio.readthedocs.io/en/latest/fio_doc.html)測試 I / O 性能. 該測試應該在 NFS 服務器和與 NFS 服務器通信的應用程序節點上都運行. 安裝: * 在 Ubuntu 上: `apt install fio` . * 在`yum`管理的環境中: `yum install fio` . 然后運行以下命令: ``` fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --filename=/path/to/git-data/testfile --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75 ``` 這將在`/path/to/git-data/testfile`創建一個 4GB 的文件. 它使用文件中的 75%/ 25%的拆分來執行 4KB 讀取和寫入,一次運行 64 個操作. 測試完成后,請確保刪除文件. 輸出將根據所安裝的`fio`版本而有所不同. 以下是網絡固態驅動器(SSD)上`fio` v2.2.10 的輸出示例: ``` test: (g=0): rw=randrw, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=64 fio-2.2.10 Starting 1 process test: Laying out IO file(s) (1 file(s) / 1024MB) Jobs: 1 (f=1): [m(1)] [100.0% done] [131.4MB/44868KB/0KB /s] [33.7K/11.3K/0 iops] [eta 00m:00s] test: (groupid=0, jobs=1): err= 0: pid=10287: Sat Feb 2 17:40:10 2019 read : io=784996KB, bw=133662KB/s, iops=33415, runt= 5873msec write: io=263580KB, bw=44880KB/s, iops=11219, runt= 5873msec cpu : usr=6.56%, sys=23.11%, ctx=266267, majf=0, minf=8 IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.0% submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0% complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.1%, >=64=0.0% issued : total=r=196249/w=65895/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0 latency : target=0, window=0, percentile=100.00%, depth=64 Run status group 0 (all jobs): READ: io=784996KB, aggrb=133661KB/s, minb=133661KB/s, maxb=133661KB/s, mint=5873msec, maxt=5873msec WRITE: io=263580KB, aggrb=44879KB/s, minb=44879KB/s, maxb=44879KB/s, mint=5873msec, maxt=5873msec ``` 注意此輸出中的`iops`值. 在此示例中,SSD 每秒執行 33,415 次讀操作和每秒 11,219 次寫操作. 旋轉磁盤可能每秒產生 2,000 和 700 的讀取和寫入操作. ### Simple benchmarking[](#simple-benchmarking "Permalink") **注意:**此測試是幼稚的,但如果系統上沒有`fio`可能有用. 在此測試中可能會收到不錯的結果,但由于讀取速度和其他各種因素,性能仍然很差. 以下單行命令為文件系統的讀寫性能提供了快速基準. 這會將 1,000 個小文件寫入執行該文件的目錄,然后讀取相同的 1,000 個文件. 1. 更改為適當的[存儲庫存儲路徑](../repository_storage_paths.html)的根目錄. 2. 為測試創建一個臨時目錄,以便以后輕松刪除文件: ``` mkdir test; cd test ``` 3. 運行命令: ``` time for i in {0..1000}; do echo 'test' > "test${i}.txt"; done ``` 4. 要測試讀取性能,請運行以下命令: ``` time for i in {0..1000}; do cat "test${i}.txt" > /dev/null; done ``` 5. 刪除測試文件: ``` cd ../; rm -rf test ``` `time for ...`命令的`time for ...`輸出將類似于以下內容. 重要指標是`real` . ``` $ time for i in {0..1000}; do echo 'test' > "test${i}.txt"; done real 0m0.116s user 0m0.025s sys 0m0.091s $ time for i in {0..1000}; do cat "test${i}.txt" > /dev/null; done real 0m3.118s user 0m1.267s sys 0m1.663s ``` 根據與多個客戶的經驗,此任務應花費 10 秒以表明文件系統性能良好.
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看