Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
4d2a88bd
Unverified
Commit
4d2a88bd
authored
Feb 23, 2025
by
Baizhou Zhang
Committed by
GitHub
Feb 23, 2025
Browse files
[Docs]Add instruction for manually stopping nsys profiler (#3795)
Co-authored-by:
zhaochenyang20
<
zhaochen20@outlook.com
>
parent
45360b2f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
docs/references/benchmark_and_profiling.md
docs/references/benchmark_and_profiling.md
+17
-2
No files found.
docs/references/benchmark_and_profiling.md
View file @
4d2a88bd
...
...
@@ -71,14 +71,29 @@ apt install nsight-systems-cli
2.
To profile a server, e.g.
```
bash
# server
# set the delay and duration times according to needs
# launch the server, set the delay and duration times according to needs
# after the duration time has been used up, server will be killed by nsys
nsys profile
--trace-fork-before-exec
=
true
--cuda-graph-trace
=
node
-o
sglang.out
--delay
60
--duration
70 python3
-m
sglang.launch_server
--model-path
meta-llama/Llama-3.1-8B-Instruct
--disable-radix-cache
# client
python3
-m
sglang.bench_serving
--backend
sglang
--num-prompts
1000
--dataset-name
random
--random-input
1024
--random-output
512
```
In practice, we recommend users to set
`--duration`
argument to a large value. Whenever user wants the server to stop profiling. Firstly run:
```
bash
nsys sessions list
```
to get the session id in the form of
`profile-XXXXX`
, then run:
```
bash
nsys stop
--session
=
profile-XXXXX
```
to manually kill the profiler and generate
`nsys-rep`
files instantly.
3.
Use NVTX to annotate code regions, e.g. to see their execution time.
```
bash
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment