mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-16 17:20:33 +00:00
feat(admin): Add admin v3 API routes and profiling endpoints for RustFS (#774)
* add Jemalloc * feat: optimize AI rules with unified .rules.md (#401) * feat: optimize AI rules with unified .rules.md and entry points - Create .rules.md as the central AI coding rules file - Add .copilot-rules.md as GitHub Copilot entry point - Add CLAUDE.md as Claude AI entry point - Incorporate principles from rustfs.com project - Add three critical rules: 1. Use English for all code comments and documentation 2. Clean up temporary scripts after use 3. Only make confident modifications * Update CLAUDE.md --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> * feat: translate chinese to english (#402) * Checkpoint before follow-up message Co-authored-by: anzhengchao <anzhengchao@gmail.com> * Translate project documentation and comments from Chinese to English Co-authored-by: anzhengchao <anzhengchao@gmail.com> * Fix typo: "unparseable" to "unparsable" in version test comment Co-authored-by: anzhengchao <anzhengchao@gmail.com> * Refactor compression test code with minor syntax improvements Co-authored-by: anzhengchao <anzhengchao@gmail.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> * fix: the automatic logout issue and user list display failure on Windows systems (#353) (#343) (#403) Co-authored-by: 安正超 <anzhengchao@gmail.com> * upgrade version * improve code for profiling * fix * Initial plan * feat: Implement layered DNS resolver with caching and validation Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> * feat: Integrate DNS resolver into main application and fix formatting Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> * feat: Implement enhanced DNS resolver with Moka cache and layered fallback Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> * feat: Implement hickory-resolver with TLS support for enhanced DNS resolution Co-authored-by: houseme <4829346+houseme@users.noreply.github.com> * upgrade * add .gitignore config * fix * add * add * up * improve linux profiling * fix * fix * fix * feat(admin): Refactor profiling endpoints Replaces the existing pprof profiling endpoints with new trigger-based APIs for CPU and memory profiling. This change simplifies the handler logic by moving the profiling implementation to a dedicated module. A new handler file `admin/handlers/profile.rs` is created to contain the logic for these new endpoints. The core profiling functions are now expected to be in the `profiling` module, which the new handlers call to generate and save profile data. * cargo shear --fix * fix * fix * fix --------- Co-authored-by: 安正超 <anzhengchao@gmail.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: shiro.lee <69624924+shiroleeee@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: houseme <4829346+houseme@users.noreply.github.com>
This commit is contained in:
@@ -116,7 +116,29 @@ if [ -n "$1" ]; then
|
||||
export RUSTFS_VOLUMES="$1"
|
||||
fi
|
||||
|
||||
# Enable jemalloc for memory profiling
|
||||
# MALLOC_CONF parameters:
|
||||
# prof:true - Enable heap profiling
|
||||
# prof_active:true - Start profiling immediately
|
||||
# lg_prof_sample:16 - Average number of bytes between samples (2^16 = 65536 bytes)
|
||||
# log:true - Enable logging
|
||||
# narenas:2 - Number of arenas (controls concurrency and memory fragmentation)
|
||||
# lg_chunk:21 - Chunk size (2^21 = 2MB)
|
||||
# background_thread:true - Enable background threads for purging
|
||||
# dirty_decay_ms:1000 - Time (ms) before dirty pages are purged
|
||||
# muzzy_decay_ms:1000 - Time (ms) before muzzy pages are purged
|
||||
# You can override these defaults by setting the MALLOC_CONF environment variable before running this script.
|
||||
if [ -z "$MALLOC_CONF" ]; then
|
||||
export MALLOC_CONF="prof:true,prof_active:true,lg_prof_sample:16,log:true,narenas:2,lg_chunk:21,background_thread:true,dirty_decay_ms:1000,muzzy_decay_ms:1000"
|
||||
fi
|
||||
|
||||
# Start webhook server
|
||||
#cargo run --example webhook -p rustfs-notify &
|
||||
# Start main service
|
||||
cargo run --bin rustfs
|
||||
# To run with profiling enabled, uncomment the following line and comment the next line
|
||||
#cargo run --profile profiling --bin rustfs
|
||||
# To run in release mode, use the following line
|
||||
cargo run --profile release --bin rustfs
|
||||
# To run in debug mode, use the following line
|
||||
#cargo run --bin rustfs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user