9 Star 43 Fork 15

Gitee 极速下载 / MeiliSearch

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/meilisearch/MeiliSearch
克隆/下载
PROFILING.md 1.74 KB
一键复制 编辑 原始数据 按行查看 历史
Kerollmops 提交于 2023-09-25 15:02 . Update the PROFILING.md file

Profiling Meilisearch

Search engine technologies are complex pieces of software that require thorough profiling tools. We chose to use Puffin, which the Rust gaming industry uses extensively. You can export and import the profiling reports using the top bar's File menu options in Puffin Viewer.

An example profiling with Puffin viewer

Profiling the Indexing Process

When you enable the exportPuffinReports experimental feature of Meilisearch, Puffin reports with the .puffin extension will be automatically exported to disk. When this option is enabled, the engine will automatically create a "frame" whenever it executes the IndexScheduler::tick method.

Puffin Viewer is used to analyze the reports. Those reports show areas where Meilisearch spent time during indexing.

Another piece of advice on the Puffin viewer UI interface is to consider the Merge children with same ID option. It can hide the exact actual timings at which events were sent. Please turn it off when you see strange gaps on the Flamegraph. It can help.

Profiling the Search Process

We still need to take the time to profile the search side of the engine with Puffin. It would require time to profile the filtering phase, query parsing, creation, and execution. We could even profile the Actix HTTP server.

The only issue we see is the framing system. Puffin requires a global frame-based profiling phase, which collides with Meilisearch's ability to accept and answer multiple requests on different threads simultaneously.

Rust
1
https://gitee.com/mirrors/MeiliSearch.git
git@gitee.com:mirrors/MeiliSearch.git
mirrors
MeiliSearch
MeiliSearch
main

搜索帮助