Skip to content

Commit 03f97c8

Browse files
committed
might be a better format
1 parent 0cfe39b commit 03f97c8

1 file changed

Lines changed: 36 additions & 36 deletions

File tree

README.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,57 +20,57 @@ The AWS-C-S3 library is an asynchronous AWS S3 client focused on maximizing thro
2020

2121
#### Environment Variables
2222

23-
##### Memory Limit - `AWS_CRT_S3_MEMORY_LIMIT_IN_GIB`
23+
1. **Memory Limit - `AWS_CRT_S3_MEMORY_LIMIT_IN_GIB`**
2424

25-
The S3 client uses a buffer pool to manage memory for concurrent transfers.
25+
The S3 client uses a buffer pool to manage memory for concurrent transfers.
2626

27-
Example Usage:
27+
Example Usage:
2828

29-
```bash
29+
```bash
3030
export AWS_CRT_S3_MEMORY_LIMIT_IN_GIB=4 # 4 GiB limit
31-
```
32-
33-
> [!TIP]
34-
> You can also control memory limit *in bytes* using client config:
35-
> ```c
36-
> struct aws_s3_client_config config = {
37-
> .memory_limit_in_bytes = GB_TO_BYTES(4), // 4 GiB limit
38-
> // ... other configuration
39-
> };
40-
> ```
31+
```
4132

42-
###### Priority
43-
The configuration value takes precedence over the environment variable. If `memory_limit_in_bytes` is set to a non-zero value in the config, the environment variable is ignored.
33+
> [!TIP]
34+
> You can also control memory limit *in bytes* using client config. The client config takes precedence over the environment variable (memory_limit_in_bytes needs to be set to a non-zero value).
35+
> ```c
36+
> struct aws_s3_client_config config = {
37+
> .memory_limit_in_bytes = GB_TO_BYTES(4), // 4 GiB limit
38+
> // ... other configuration
39+
> };
40+
> ```
4441
45-
###### Default Behavior
46-
If neither is set (config is 0 and environment variable is not set), the client sets a default memory limit based on the target throughput.
42+
**Default Behavior**:
43+
If neither is set (config is 0 and environment variable is not set), the client sets a default memory limit based on the target throughput.
4744
48-
###### Notes
49-
* The limit applies per client. If multiple clients created, limit will apply to each separately.
50-
* The environment variable value must be a valid positive integer representing gigabytes (GiB).
51-
* The value is converted from GiB to bytes internally (1 GiB = 1024³ bytes).
52-
* Invalid values or overflow conditions will cause client creation to fail with `AWS_ERROR_INVALID_ARGUMENT`.
45+
**Notes**:
46+
* The limit applies per client. If multiple clients created, limit will apply to each separately.
47+
* The environment variable value must be a valid positive integer representing gigabytes (GiB).
48+
* The value is converted from GiB to bytes internally (1 GiB = 1024³ bytes).
49+
* Invalid values or overflow conditions will cause client creation to fail with `AWS_ERROR_INVALID_ARGUMENT`.
5350
54-
##### Maximum Parts Pending Read - `AWS_CRT_S3_MAX_PARTS_PENDING_READ`
51+
2. **Maximum Parts Pending Read - `AWS_CRT_S3_MAX_PARTS_PENDING_READ`**
5552
56-
Controls the maximum number of parts that can be pending read from the input stream during a multipart upload. Higher values may improve upload throughput for large files by allowing more parts to be read in parallel, at the cost of higher memory usage.
53+
Controls the maximum number of parts that can be pending read from the input stream during a multipart upload. Higher values may improve upload throughput for large files by allowing more parts to be read in parallel, at the cost of higher memory usage.
5754
58-
Example Usage:
55+
Example Usage:
5956
60-
```bash
57+
```bash
6158
export AWS_CRT_S3_MAX_PARTS_PENDING_READ=20
62-
```
59+
```
60+
61+
**Default Behavior**:
62+
If not set, the default value is 5.
6363
64-
###### Notes
65-
* Only affects multipart uploads. Small files that fit in a single part are not affected.
66-
* Setting this too low may introduce delays between reads, as the meta-request waits for the client to schedule more work.
67-
* Setting this too high may cause a single upload to hog work tokens, starving other concurrent uploads.
68-
* The value must be a positive integer (1–4294967295). Invalid or zero values are ignored with a warning, and the default is used.
69-
* The value is read once on first use and cached for the lifetime of the process.
64+
**Notes**:
65+
* Only affects multipart uploads. Small files that fit in a single part are not affected.
66+
* Setting this too low may introduce delays between reads, as the meta-request waits for the client to schedule more work.
67+
* Setting this too high may cause a single upload to hog work tokens, starving other concurrent uploads.
68+
* The value must be a positive integer (1–4294967295). Invalid or zero values are ignored with a warning, and the default is used.
69+
* The value is read once on first use and cached for the lifetime of the process.
7070
71-
##### Test Bucket - `CRT_S3_TEST_BUCKET_NAME`
71+
3. **Test Bucket - `CRT_S3_TEST_BUCKET_NAME`**
7272
73-
The S3 bucket name used for running unit tests. See the [test_helper documentation](./tests/test_helper/) for setup instructions.
73+
The S3 bucket name used for running unit tests. See the [test_helper documentation](./tests/test_helper/) for setup instructions.
7474
7575
## License
7676

0 commit comments

Comments
 (0)