---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://ydb.tech/docs/en/contributor/load-actors-overview.md?version=v26.1
  - https://ydb.tech/docs/ru/contributor/load-actors-overview.md?version=v26.1
  - href: ru/contributor/load-actors-overview.md
    type: text/markdown
    title: Markdown version
  - href: ../llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: ru/core/contributor/load-actors-overview.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/ru/llms.txt

# Обзор тестирования с помощью нагружающих акторов

Тестирование производительности системы является важным этапом добавления изменений в ядро YDB. С помощью [нагрузочного тестирования](https://ru.wikipedia.org/wiki/Нагрузочное_тестирование) вы можете:

* определить показатели производительности и сравнить их со значениями до изменений;
* проверить работоспособность системы на высоких или пиковых нагрузках.

Сама по себе задача нагрузить высокопроизводительную распределенную систему является нетривиальной. Часто разработчику приходится запускать несколько инстансов клиента, чтобы добиться требуемой загрузки сервера. YDB реализует простой и удобный механизм подачи нагрузки — нагружающие акторы. Акторы создаются и запускаются в самом кластере, таким образом не нужно привлекать дополнительные ресурсы для запуска клиентов. Нагружающие акторы могут быть запущены на произвольных узлах кластера — на одном, на всех или только на выбранных. Вы можете создать любое количество акторов на любом из узлов.

Нагружающие акторы позволяют тестировать как систему в целом, так отдельные ее компоненты:

<!-- diplodoc:svg ![load-actors](../_assets/load-actors.svg) --><!--Do not edit this file with editors other than diagrams.net--><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="461px" height="641px" viewBox="-0.5 -0.5 461 641" content="&lt;mxfile host=&quot;Electron&quot; modified=&quot;2022-12-29T11:51:36.536Z&quot; agent=&quot;5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/20.7.4 Chrome/106.0.5249.199 Electron/21.3.3 Safari/537.36&quot; etag=&quot;fmLuNjrHHU_9gJvZfuO-&quot; version=&quot;20.7.4&quot; type=&quot;device&quot;&gt;&lt;diagram id=&quot;ubN0F7Ct8m74YTRy8KRH&quot; name=&quot;Page-1&quot;&gt;5Vtde6I4FP41XnYf+ay9bLWd3R3nWbvd7dSrfSKkyhYJE+Io8+s3kQQliYUqIM7e+CQHOAlv3pycD+xZw+XmEwbx4gvyYdgz+/6mZ416pnnj2PSXCdJM4F5zwRwHfiYydoKn4Afkwj6XrgIfJoUbCUIhCeKi0ENRBD1SkAGM0bp42ysKi6PGYA4VwZMHQlX6NfDJIpMOnP5O/isM5gsxstHnV5ZA3MwFyQL4aL0nsu571hAjRLLWcjOEIcNO4JI993Dgaj4xDCNS5YFkfPcwXKcvj5Pp/T9mOnp4TV6uTCdT8x2EK/7GfLYkFRBgtIp8yLT0e9bdehEQ+BQDj11d0zWnsgVZhrRn0OYrighfRcNm/SAMhyhEmAoiFFH5XUIweoOSkE8DYgI3B1/QyGGjdINoCQlO6S3iAYH0erdQtstli71Fcm0uBJwc81zXDj/a4BB+BM6PoGlUQFNFrwagLAFUKvX3gMtpuw/coAbcXsHfky8/pm/j32e/PbqbB2uEn68MBbfJKEjeTgPvACwa8A4jZReRsm0VqYEGqDoIpgXKUoB67iRQlnNmoFS7NoLfAwqAjBQ1yzFremkYUMiwVY7XLAN3PMsFwHubbyH/Y0WoGsjlCTeETk0gO0WQHc2+1dm7xrbtTbm5g5F/y45hhnAIkiTwilgWiQo3AXlhB80vDu9N966MNvwM2nZS0fHpgc0HRJgs0BxFILzfSe8o4jjdU8u6U/E06+wUb3tC88ElS9AKe7B8m7KpFV0XgOeQlBlClQB7C+xoFljIMAwBCb4Xx9StOh9hggL6Zjm/XEPaxDcScbL35k/tuxqSIuvG0ZtNoSjDQVG0JWH+2iccJ+p5cg5iHkm7bW8CcUBhgLgyy49na1VyOlpWn4utdl8imXUkWxVFTstsHVRga+nyF/m6u2eMUMyF/0JCUu6cgxVBRcIfQ/ETOGdVtYh2RdZVptNpnqrqgX2G6VXWNd2QMHcA09actf4CsxCS83tnksNvuKrjcNOmdybmc27Kt+4YCDbv0/69SLIrrLeV9aJhB8HBbEXoApj9J4Iwy6SY/QlGm7RzjDc1gZs2xG2M8kYVZ7l5yp9AXedCLbYmFAQEMNIuAPY7a7Rtp2NG27i+dAa7VRlc1dNticGuAvzjCm4nQK2tB5ME4bPT1bou0nWgstVoyuBqT9AGU2UnZV/tM6bKtEBVKAFcfhZHScWUGJD3KFXqvLl6ArQTF8tZQrt/bFwsJ7+bi4sPo9hMUaDWDdxmUUALVJVz+YI3sDYfVuOu1ngF+pDsvNt6ILHu2ORsnicTVQSj3W0thqsQS36itIwVLtOdS4rs1VaUNbVTEAbziG0ByhHGpDtmBwIPhLf8wjLw/S1XdVakWAevwZBYTjHxqKvDGjpKyZnO2iyJJnH++Vs8RsA/zeo2U8fOI6KuuJyGqcIH02fWuxQMdVFmyyCqjju3CJeCoS7Z1DKGar5uG/xcCoK6mKhlBNWoaOt9fsUUngzGIYu/mexPCHxJNEbzS8E69wfKsHYbw7obiSXh9Yr2tOABl9V4Cx7tzsFtPigVZ3Z5VuuA/3pyHVY6QY6vw0qKrlt2TLtVh/0IDeukk9kIS/JUtVhcOeqo/G2JXMuUv25qmiXdqONcqrH6WNm/dhpaso0xj6WhXJ2RFTVMw65U0M9srBpiiVHTkaZ8FtvykWaq8fz/kSVOMyyRTyI5GDmWJbbsaTfNEjVtobJkl0DmoYgPkkVOioOp5KrLeLa0qnQguMdWS2RFzX3yql9DNWuSf9kgPmwQAvYfncLqut9WSFy4yj5av6U3GHa8yR7j14WiLLTtA48gnAitdNqZ4uJgVLw3AYlVP00q17iWUrnVvtVoLJFrqgmg5ugwHbEmWDJko1kSF1e/nBSZLIlBdNI0lBf00DKmbIlI8t64VJYN/bNz1HJLOZo7Ou2QVK3wduJPOqdVh9v7kw7t7v4+mh0ku//gWvf/AQ==&lt;/diagram&gt;&lt;/mxfile&gt;" style="background-color: rgb(255, 255, 255);"><defs/><g><rect x="0" y="0" width="460" height="640" fill="none" stroke="none" pointer-events="all"/><rect x="200" y="320" width="220" height="80" rx="12" ry="12" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/><rect x="220" y="440" width="80" height="40" rx="6" ry="6" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 460px; margin-left: 221px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">PDisk</div></div></div></foreignObject><text x="260" y="464" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">PDisk</text></switch></g><rect x="220" y="350" width="80" height="40" rx="6" ry="6" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 370px; margin-left: 221px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VDisk</div></div></div></foreignObject><text x="260" y="374" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">VDisk</text></switch></g><path d="M 230 535 C 230 526.72 243.43 520 260 520 C 267.96 520 275.59 521.58 281.21 524.39 C 286.84 527.21 290 531.02 290 535 L 290 585 C 290 593.28 276.57 600 260 600 C 243.43 600 230 593.28 230 585 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 290 535 C 290 543.28 276.57 550 260 550 C 243.43 550 230 543.28 230 535" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 573px; margin-left: 231px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Device</div></div></div></foreignObject><text x="260" y="576" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Device</text></switch></g><path d="M 260 390 L 260 433.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 260 438.88 L 256.5 431.88 L 260 433.63 L 263.5 431.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 260 480 L 260 513.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 260 518.88 L 256.5 511.88 L 260 513.63 L 263.5 511.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 245 200 L 245 210 Q 245 220 255 220 L 300 220 Q 310 220 310 226.82 L 310 233.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 310 238.88 L 306.5 231.88 L 310 233.63 L 313.5 231.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="200" y="160" width="90" height="40" rx="6" ry="6" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 180px; margin-left: 201px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Key-value<br/>Tablet</div></div></div></foreignObject><text x="245" y="184" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Key-value...</text></switch></g><path d="M 310 280 L 310 313.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 310 318.88 L 306.5 311.88 L 310 313.63 L 313.5 311.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="200" y="240" width="220" height="40" rx="6" ry="6" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 218px; height: 1px; padding-top: 260px; margin-left: 201px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Distributed Storage Proxy</div></div></div></foreignObject><text x="310" y="264" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Distributed Storage Proxy</text></switch></g><path d="M 375 200 L 375 210 Q 375 220 365 220 L 320 220 Q 310 220 310 226.82 L 310 233.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 310 238.88 L 306.5 231.88 L 310 233.63 L 313.5 231.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="330" y="160" width="90" height="40" rx="6" ry="6" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 180px; margin-left: 331px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Data Shard<br/>Tablet</div></div></div></foreignObject><text x="375" y="184" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Data Shard...</text></switch></g><path d="M 310 120 L 310 130 Q 310 140 320 140 L 365 140 Q 375 140 375 146.82 L 375 153.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 375 158.88 L 371.5 151.88 L 375 153.63 L 378.5 151.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="250" y="80" width="120" height="40" rx="6" ry="6" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 100px; margin-left: 251px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Query Processor</div></div></div></foreignObject><text x="310" y="104" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Query Processor</text></switch></g><rect x="320" y="350" width="80" height="40" rx="6" ry="6" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 370px; margin-left: 321px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VDisk</div></div></div></foreignObject><text x="360" y="374" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">VDisk</text></switch></g><path d="M 360 390 L 360 433.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 360 438.88 L 356.5 431.88 L 360 433.63 L 363.5 431.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="320" y="440" width="80" height="40" rx="6" ry="6" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 78px; height: 1px; padding-top: 460px; margin-left: 321px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">PDisk</div></div></div></foreignObject><text x="360" y="464" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">PDisk</text></switch></g><path d="M 360 480 L 360 513.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 360 518.88 L 356.5 511.88 L 360 513.63 L 363.5 511.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><rect x="235" y="320" width="150" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 148px; height: 1px; padding-top: 335px; margin-left: 236px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Distributed Storage Group</div></div></div></foreignObject><text x="310" y="339" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Distributed Storage Group</text></switch></g><rect x="40" y="80" width="120" height="40" rx="6" ry="6" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 100px; margin-left: 41px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">KqpLoad</div></div></div></foreignObject><text x="100" y="104" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">KqpLoad</text></switch></g><rect x="40" y="160" width="120" height="40" rx="6" ry="6" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 180px; margin-left: 41px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">KeyValueLoad</div></div></div></foreignObject><text x="100" y="184" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">KeyValueLoad</text></switch></g><rect x="40" y="240" width="120" height="40" rx="6" ry="6" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 260px; margin-left: 41px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">StorageLoad</div></div></div></foreignObject><text x="100" y="264" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">StorageLoad</text></switch></g><rect x="40" y="350" width="120" height="40" rx="6" ry="6" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 370px; margin-left: 41px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">VDiskLoad</div></div></div></foreignObject><text x="100" y="374" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">VDiskLoad</text></switch></g><rect x="40" y="430" width="120" height="60" rx="9" ry="9" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 460px; margin-left: 41px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">PDiskWriteLoad, PDiskReadLoad, PDiskLogLoad</div></div></div></foreignObject><text x="100" y="464" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">PDiskWriteLoad, PDis...</text></switch></g><path d="M 160 100 L 243.63 100" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 248.88 100 L 241.88 103.5 L 243.63 100 L 241.88 96.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 160 180 L 193.63 180" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 198.88 180 L 191.88 183.5 L 193.63 180 L 191.88 176.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 160 260 L 193.63 260" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 198.88 260 L 191.88 263.5 L 193.63 260 L 191.88 256.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 160 370 L 213.63 370" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 218.88 370 L 211.88 373.5 L 213.63 370 L 211.88 366.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 160 460 L 213.63 460" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/><path d="M 218.88 460 L 211.88 463.5 L 213.63 460 L 211.88 456.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 180 600 L 180 40" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/><rect x="55" y="30" width="90" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 45px; margin-left: 56px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><b><font style="font-size: 14px;">Load actors</font></b></div></div></div></foreignObject><text x="100" y="49" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Load actors</text></switch></g><rect x="245" y="30" width="130" height="30" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 128px; height: 1px; padding-top: 45px; margin-left: 246px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;"><b><font style="font-size: 14px;">YDB</font></b><span style="font-size: 14px;"><b>components</b></span></div></div></div></foreignObject><text x="310" y="49" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">YDB components</text></switch></g><path d="M 330 535 C 330 526.72 343.43 520 360 520 C 367.96 520 375.59 521.58 381.21 524.39 C 386.84 527.21 390 531.02 390 535 L 390 585 C 390 593.28 376.57 600 360 600 C 343.43 600 330 593.28 330 585 Z" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><path d="M 390 535 C 390 543.28 376.57 550 360 550 C 343.43 550 330 543.28 330 535" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 58px; height: 1px; padding-top: 573px; margin-left: 331px;"><div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;"><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">Device</div></div></div></foreignObject><text x="360" y="576" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">Device</text></switch></g></g><switch><g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/><a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank"><text text-anchor="middle" font-size="10px" x="50%" y="100%">Text is not SVG - cannot display</text></a></switch></svg>

Например, вы можете подать [нагрузку на Distributed Storage](https://ydb.tech/docs/ru/contributor/load-actors-storage.md?version=v26.1) без задействования слоев таблеток и Query Processor. Таким образом можно изолированно тестировать отдельные слои системы и эффективно находить узкие места. Комбинация акторов разных типов позволяет запускать множество видов нагрузки.

<!-- source: ru/_includes/trunk.md -->
{% note info %}

Функциональность находится в разработке, исходный код доступен в ветке _main_ [репозитория YDB](https://github.com/ydb-platform/ydb). О том, как собрать YDB из исходного кода, читайте в [инструкции](https://github.com/ydb-platform/ydb/blob/main/BUILD.md).

{% endnote %}
<!-- endsource: ru/_includes/trunk.md -->

## Типы акторов {#load-actor-type}

| Тип                                             | Описание                                                                           |
|-------------------------------------------------|------------------------------------------------------------------------------------|
| [KqpLoad](load-actors-kqp.md)                   | Подает нагрузку на слой Query Processor и нагружает все компоненты кластера.       |
| [KeyValueLoad](load-actors-key-value.md)        | Нагружает Key-value таблетку.                                                      |
| [StorageLoad](load-actors-storage.md)           | Нагружает Distributed Storage без задействования слоев таблеток и Query Processor. |
| [VDiskLoad](load-actors-vdisk.md)               | Тестирует производительность записи на VDisk.                                      |
| [PDiskWriteLoad](load-actors-pdisk-write.md)                           | Тестирует производительность записи на PDisk.                                      |
| [PDiskReadLoad](load-actors-pdisk-read.md)      | Тестирует производительность чтения с PDisk.                                       |
| [PDiskLogLoad](load-actors-pdisk-log.md)        | Тестирует корректность вырезания из середины лога PDisk.                           |
| [MemoryLoad](load-actors-memory.md)             | Аллоцирует память, полезен при тестировании логики.                                |
| [Stop](load-actors-stop.md)                     | Останавливает все акторы, либо только указанные.                                   |

## Запуск нагрузки {#load-actor-start}

Запустить нагрузку можно с помощью следующих инструментов:

* Embedded UI кластера — позволяет создать по конфигурации и запустить нагружающий актор либо на текущем узле, либо сразу на всех узлах тенанта.
* Утилита `ydbd` — позволяет на любой узел кластера отправить конфигурацию актора с указанием, на каких узлах необходимо создать и запустить актор.

В качестве примера рассмотрим создание и запуск актора KqpLoad. Актор обращается к БД `/slice/db` как к key-value хранилищу в 64 потока, длительность нагрузки — 30 секунд. Перед началом работы актор создает необходимые таблицы, после окончания удаляет их. При создании актору будет автоматически присвоен тег. Этот же тег будет присвоен и результату теста.

{% list tabs group=tool %}

- Embedded UI

    1. Откройте страницу управления нагружающими акторами на узле (например, `http://<address>:8765/actors/load`, где `address` — адрес узла кластера, на котором нужно запустить нагрузку).
    2. В поле ввода/вывода вставьте конфигурацию актора:

    ```proto
    KqpLoad: {
        DurationSeconds: 30
        WindowDuration: 1
        WorkingDir: "/slice/db"
        NumOfSessions: 64
        UniformPartitionsCount: 1000
        DeleteTableOnFinish: 1
        WorkloadType: 0
        Kv: {
            InitRowCount: 1000
            PartitionsByLoad: true
            MaxFirstKey: 18446744073709551615
            StringLen: 8
            ColumnsCnt: 2
            RowsCnt: 1
        }
    }
    ```

    3. Чтобы создать и запустить актор, нажмите кнопку:

        * **Start new load on current node** — нагрузка будет запущена на текущем узле.
        * **Start new load on all tenant nodes** — нагрузка будет запущена на всех узлах тенанта.

    В поле ввода/вывода появится следующее сообщение:

    ```text
    {"status":"OK","tag":1}
    ```

    * `status` — статус запуска нагрузки;
    * `tag` — тег, который был присвоен нагрузке.

- CLI

    1. Создайте файл с конфигурацией актора:

    ```proto
    KqpLoad: {
        DurationSeconds: 30
        WindowDuration: 1
        WorkingDir: "/slice/db"
        NumOfSessions: 64
        UniformPartitionsCount: 1000
        DeleteTableOnFinish: 1
        WorkloadType: 0
        Kv: {
            InitRowCount: 1000
            PartitionsByLoad: true
            MaxFirstKey: 18446744073709551615
            StringLen: 8
            ColumnsCnt: 2
            RowsCnt: 1
        }
    }
    ```

    2. Запустите актор:

    ```bash
    curl <endpoint>/actors/load -H "Content-Type: application/x-protobuf-text" --data mode=start --data all_nodes=<start_on_all_nodes> --data config="$(cat proto_file)"
    ```

    * `endpoint` — http-эндпоит узла (например, `http://<address>:<port>`, где `address` — адрес узла, `port` — http-порт узла).
    * `proto_file` — путь к файлу с конфигурацией актора.
    * `start_on_all_nodes` – `true`, чтобы запустить нагрузку на всех узлах тенанта, `false`, чтобы запустить нагрузку только на узле с данным `endpoint`.

{% endlist %}

## Просмотр результата тестирования {#view-results}

Результаты тестирования можно просмотреть с помощью Embedded UI. Описание выводимых параметров смотрите в документации соответствующего актора.

{% list tabs group=tool %}

- Embedded UI

    1. Откройте страницу управления нагружающими акторами на узле (например, `http://<address>:<port>/actors/load`, где `address` — адрес узла, `port` — http-порт мониторинга узла, на котором была запущена нагрузка).
    2. Нажмите кнопку **Results**.

        Будут отображены результаты завершенных тестирований. Найдите результат с соответствующим тегом.

        ![load-actors-finished-tests](../_assets/load-actors-finished-tests.png)

{% endlist %}

<!-- source: ru/contributor/_includes/career.md -->
{% note tip "Хотите присоединиться к команде разработки YDB?" %}

Ознакомьтесь с разделами о [команде YDB и открытых вакансиях](https://ydb.tech/ru/careers/), а также о [возможностях для студентов](https://ydb.tech/ru/students/).

{% endnote %}
<!-- endsource: ru/contributor/_includes/career.md -->