Skip to content

Commit ae56c9f

Browse files
Apply suggestions from code review
Co-authored-by: Zongheng Yang <[email protected]>
1 parent fce9775 commit ae56c9f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

docs/source/reference/api-server/api-server-tunning.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Tuning API server resources
1010

1111
The number of requests that the API server can handle concurrently is proportional to the resources (CPU cores and memory) allocated to it. Internally, requests are categorized into two different types and handled in a first-in-first-out manner:
1212

13-
* ``Long-running request``: request that takes long time and more resources to run, including ``launch``, ``exec``, ``jobs.launch``, etc.
14-
* ``Short-running request``: request that takes short time or less resources to run, including ``status``, ``logs``, etc.
13+
* ``Long-running requests``: requests that take longer time and more resources to run, including ``launch``, ``exec``, ``jobs.launch``, etc.
14+
* ``Short-running requests``: requests that take shorter time or less resources to run, including ``status``, ``logs``, etc.
1515

1616
.. note::
1717

@@ -94,7 +94,9 @@ The following table shows the maximum concurrency for different resource configu
9494
Queuing requests and polling status asynchronously
9595
--------------------------------------------------
9696

97-
There is no limit on the number of queued requests, i.e. despite increasing the allocated resources to improve the maximum concurrency, you can also submit requests with :ref:`async<async>` (``--async``) and poll the status asynchronously to avoid blocking. For example:
97+
There is no limit on the number of queued requests. To avoid request blocking, you can either (1) allocate more resources to increase the maximum concurrency (described above), or (2) :ref:`submit requests asynchronously <async>` (``--async``) and poll the status asynchronously.
98+
99+
For example:
98100

99101
.. code-block:: bash
100102
@@ -115,7 +117,7 @@ The requests will be queued on the API server and be processed in submission ord
115117
767182fd-0202-4ae5-b2d7-ddfabea5c821 alice sky.jobs.launch a few secs ago PENDING
116118
5667cff2-e953-4b80-9e5f-546cea83dc59 alice sky.jobs.launch a few secs ago RUNNING
117119
118-
Check logs for a request
120+
Checking the logs of a request
119121
^^^^^^^^^^^^^^^^^^^^^^^^
120122

121123
There should be some ``RUNNING`` requests that occupy the concurrency limit. Usually the ``RUNNING`` requests make progress and finally your requests will be processed, but if the ``RUNNING`` requests are stuck, you can inspect the request log with:
@@ -125,7 +127,7 @@ There should be some ``RUNNING`` requests that occupy the concurrency limit. Usu
125127
# Replace <request_id> with the actual request id from the ID column
126128
$ sky api logs <request_id>
127129
128-
Cancel a request
130+
Canceling a request
129131
^^^^^^^^^^^^^^^^
130132

131133
If the request is stuck according to the log, e.g. retrying to launch VMs that is out of stock, you can cancel the request with:
@@ -137,7 +139,7 @@ If the request is stuck according to the log, e.g. retrying to launch VMs that i
137139
Avoid concurrent logs requests
138140
------------------------------
139141

140-
If you run ``sky logs`` to tail the logs of a task, the log tailing will keep taking off the resources of the API server as long as the task being tailed is running. So concurrent log requests will occupy the concurrency and make other requests to be delayed.
142+
If you run ``sky logs`` to tail the logs of a task, the log tailing will keep taking resources off the API server as long as the task being tailed is still running. Thus, concurrent log requests will occupy the concurrency limit and potentially delay other requests.
141143

142144
To avoid this, it is recommended to run ``sky logs`` and ``sky jobs logs`` with ``--no-follow`` flag if there is a large number of concurrent log requests:
143145

0 commit comments

Comments
 (0)