You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(dev): clarify GPU monitoring behavior in containers
This commit improves monitoring logic to clearly indicate that GPU
monitoring cannot be done automatically using the script name or
container PID inside a container. Users are advised to provide the host
PID instead.
Copy file name to clipboardexpand all lines: scripts/README.md
+16-2
Original file line number
Diff line number
Diff line change
@@ -117,18 +117,32 @@ The `spinup_comfystream_tensordock.py` script automates VM provisioning, setup,
117
117
To monitor the resource consumption of a running ComfyStream server, use the `monitor_pid_resources.py` script:
118
118
119
119
1. **Start the ComfyStream server** and execute a streaming workflow.
120
-
2. **Retrieve the process ID (PID) of the server** using:
120
+
2. **Run the profiling script**:
121
+
122
+
```bash
123
+
python monitor_pid_resources.py --name app.py
124
+
```
125
+
126
+
The script will automatically try to find the process ID (PID) of the server. If you prefer to specify the PID manually, you can retrieve it using:
121
127
122
128
```bash
123
129
pgrep -f app.py | xargs ps -o pid,cmd --pid
124
130
```
125
131
126
-
3. **Run the profiling script:**
132
+
Then run the profiling script with the retrieved PID:
127
133
128
134
```bash
129
135
python monitor_pid_resources.py --pid <PID>
130
136
```
131
137
138
+
3. **Running Inside a Container**: If you are running the script inside a container, use the `--host-pid` option to provide the host PID for accurate GPU monitoring:
The script will continuously track **CPU and memory usage** at specified intervals. If the `--spy` flag is used, it will also generate a **detailed Py-Spy profiler report**for deeper performance insights.
0 commit comments