Skip to content

Commit 2708633

Browse files
landon-lengyelkolchfa-aws
authored andcommitted
Update performance.md - Remove old curl commands (#8761)
* Update performance.md Updating old curl examples to current standard across the rest of the documentation. Signed-off-by: Landon Lengyel <landon@almonde.org> * Apply suggestions from code review Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> --------- Signed-off-by: Landon Lengyel <landon@almonde.org> Signed-off-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Eric Pugh <epugh@opensourceconnections.com>
1 parent d3d2778 commit 2708633

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

_tuning-your-cluster/performance.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,9 @@ An increased `index.translog.flush_threshold_size` can also increase the time th
3232
Before increasing `index.translog.flush_threshold_size`, call the following API operation to get current flush operation statistics:
3333

3434
```json
35-
curl -XPOST "os-endpoint/index-name/_stats/flush?pretty"
35+
GET /<index>/_stats/flush?pretty
3636
```
37-
{% include copy.html %}
38-
39-
40-
Replace the `os-endpoint` and `index-name` with your endpoint and index name.
37+
{% include copy-curl.html %}
4138

4239
In the output, note the number of flushes and the total time. The following example output shows that there are 124 flushes, which took 17,690 milliseconds:
4340

@@ -53,9 +50,15 @@ In the output, note the number of flushes and the total time. The following exam
5350
To increase the flush threshold size, call the following API operation:
5451

5552
```json
56-
curl -XPUT "os-endpoint/index-name/_settings?pretty" -d "{"index":{"translog.flush_threshold_size" : "1024MB"}}"
53+
PUT /<index>/_settings
54+
{
55+
"index":
56+
{
57+
"translog.flush_threshold_size" : "1024MB"
58+
}
59+
}
5760
```
58-
{% include copy.html %}
61+
{% include copy-curl.html %}
5962

6063
In this example, the flush threshold size is set to 1024 MB, which is ideal for instances that have more than 32 GB of memory.
6164

@@ -65,9 +68,9 @@ Choose the appropriate threshold size for your cluster.
6568
Run the stats API operation again to see whether the flush activity changed:
6669

6770
```json
68-
curl -XGET "os-endpoint/index-name/_stats/flush?pretty"
71+
GET /<index>/_stats/flush
6972
```
70-
{% include copy.html %}
73+
{% include copy-curl.html %}
7174

7275
It's a best practice to increase the `index.translog.flush_threshold_size` only for the current index. After you confirm the outcome, apply the changes to the index template.
7376
{: .note}
@@ -127,14 +130,14 @@ To reduce the size of the OpenSearch response, use the `filter_path` parameter t
127130
In the following example, the `index-name`, `type-name`, and `took` fields are excluded from the response:
128131

129132
```json
130-
curl -XPOST "es-endpoint/index-name/type-name/_bulk?pretty&filter_path=-took,-items.index._index,-items.index._type" -H 'Content-Type: application/json' -d'
133+
POST /_bulk?pretty&filter_path=-took,-items.index._index,-items.index._type
131134
{ "index" : { "_index" : "test2", "_id" : "1" } }
132135
{ "user" : "testuser" }
133136
{ "update" : {"_id" : "1", "_index" : "test2"} }
134137
{ "doc" : {"user" : "example"} }
135138
```
136-
{% include copy.html %}
139+
{% include copy-curl.html %}
137140

138141
## Compression codecs
139142

140-
In OpenSearch 2.9 and later, there are two new codecs for compression: `zstd` and `zstd_no_dict`. You can optionally specify a compression level for these in the `index.codec.compression_level` setting with values in the [1, 6] range. [Benchmark]({{site.url}}{{site.baseurl}}/im-plugin/index-codecs/#benchmarking) data shows that `zstd` provides a 7% better write throughput and `zstd_no_dict` provides a 14% better throughput, along with a 30% improvement in storage compared with the `default` codec. For more information about compression, see [Index codecs]({{site.url}}{{site.baseurl}}/im-plugin/index-codecs/).
143+
In OpenSearch 2.9 and later, there are two new codecs for compression: `zstd` and `zstd_no_dict`. You can optionally specify a compression level for these in the `index.codec.compression_level` setting with values in the [1, 6] range. [Benchmark]({{site.url}}{{site.baseurl}}/im-plugin/index-codecs/#benchmarking) data shows that `zstd` provides a 7% better write throughput and `zstd_no_dict` provides a 14% better throughput, along with a 30% improvement in storage compared with the `default` codec. For more information about compression, see [Index codecs]({{site.url}}{{site.baseurl}}/im-plugin/index-codecs/).

0 commit comments

Comments
 (0)