You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2023/08/03 12:38:00 UTC
[jira] [Updated] (RATIS-1705) Fix metrics leak
[ https://issues.apache.org/jira/browse/RATIS-1705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tsz-wo Sze updated RATIS-1705:
------------------------------
Component/s: metrics
Summary: Fix metrics leak (was: Ozone S3g leak ratis GRPC messages metrics)
> Fix metrics leak
> -----------------
>
> Key: RATIS-1705
> URL: https://issues.apache.org/jira/browse/RATIS-1705
> Project: Ratis
> Issue Type: Bug
> Components: metrics
> Reporter: ChenXi
> Priority: Major
> Time Spent: 2h 10m
> Remaining Estimate: 0h
>
> How to reproduce bugs:
> # an ozone cluster with s3g components.
> # mutliupload an object to s3g.
> It is very important that you use an s3g that is not receiving any other requests before doing a mutliupload. In other words, *the mutliupload must be the first request received by the s3g after it starts.*
> there is a mutliupload example code:
> {code:python}
> import boto3
> from boto3.s3.transfer import TransferConfig
> # boto3 maybe need install
> MB = 1024 * 1024
> s3 = boto3.resource('s3')
> MultipartChunkSize = 5 * MB
> MaxConcurrency = 10
> AccessKeyID = "user_id"
> SecretAccessKey = "user_key"
> BucketRegion = "dummyregion"
> BucketName = "testbucket"
> EndpointUrl = "http://localhost:9878"
> LocalFilePath = "/root/50M.img"
> ObjectKeyName = "key_from_py"
> def multipart_upload(client, local_file_path, bucket_name, object_key, multipart_chunksize,
> max_concurrency):
> config = TransferConfig(multipart_chunksize=multipart_chunksize,
> max_concurrency=max_concurrency)
> client.upload_file(local_file_path, bucket_name, object_key, Config=config)
> if __name__ == '__main__':
> client = boto3.client('s3',
> endpoint_url=EndpointUrl,
> aws_access_key_id=AccessKeyID,
> aws_secret_access_key=SecretAccessKey)
> multipart_upload(client, LocalFilePath, BucketName, ObjectKeyName, MultipartChunkSize,
> MaxConcurrency)
> {code}
>
> After that, every time upload(mutliupload / normal upload), the ratis grpc metrics will increase,
> You can run
> {code:java}
> curl -s http://{you_address}:9878/jmx | grep client_message_metrics | wc -l {code}
> to verify that
> *With the increase of the index, it may lead to s3g OOM*
--
This message was sent by Atlassian Jira
(v8.20.10#820010)