[ 
https://issues.apache.org/jira/browse/HDDS-8143?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17699181#comment-17699181
 ] 

Duong edited comment on HDDS-8143 at 3/11/23 7:29 AM:
------------------------------------------------------

h3. Pure reads with optimized symmetric block tokens

Test with [an 
optimization|https://github.com/duongkame/ozone/pull/3/commits/7e1e6427f72ff08373ef4edff285f152d6a660e0]
 to reuse Mac instances.
{code:java}
macInstances = ThreadLocal.withInitial(() -> {
  try {
    return Mac.getInstance(secretKey.getAlgorithm());
  } catch (NoSuchAlgorithmException e) {
    throw new IllegalArgumentException(
        "Invalid algorithm " + secretKey.getAlgorithm() , e);
  }
}); 

public byte[] sign(byte[] data) {
  try {
    Mac mac = macInstances.get();
    // use mac to generate the data signature
    ...{code}
Result: Top OPPS is pushed back to *70K.* GetKeyInfo latency reduces to *280μs* 
with only around *15μs* for block token generation.

!symmetric-pure-read-with-block-token-optimized.png|width=704,height=713!

!symmetric-block-token-latency-optimized.png|width=704,height=234!


was (Author: JIRAUSER290990):
h3. With optimized symmetric block tokens

Test with [an 
optimization|https://github.com/duongkame/ozone/pull/3/commits/7e1e6427f72ff08373ef4edff285f152d6a660e0]
 to reuse Mac instances.
{code:java}
macInstances = ThreadLocal.withInitial(() -> {
  try {
    return Mac.getInstance(secretKey.getAlgorithm());
  } catch (NoSuchAlgorithmException e) {
    throw new IllegalArgumentException(
        "Invalid algorithm " + secretKey.getAlgorithm() , e);
  }
}); 

public byte[] sign(byte[] data) {
  try {
    Mac mac = macInstances.get();
    // use mac to generate the data signature
    ...{code}
Result: Top OPPS is pushed back to *70K.* GetKeyInfo latency reduces to *280μs* 
with only around *15μs* for block token generation.

!symmetric-pure-read-with-block-token-optimized.png|width=704,height=713!

!symmetric-block-token-latency-optimized.png|width=704,height=234!

> Evaluate symmetric tokens performance
> -------------------------------------
>
>                 Key: HDDS-8143
>                 URL: https://issues.apache.org/jira/browse/HDDS-8143
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Duong
>            Priority: Major
>         Attachments: baseline-pure-read-no-block-token2.png, 
> baseline-pure-read-with-block-token.png, baseline_block_token.htm, 
> basline-block-token-latency.png, block_token_generation_analysis.png, 
> image-2023-03-10-23-05-02-048.png, 
> symmetric-block-token-latency-optimized.png, 
> symmetric-block-token-latency.png, 
> symmetric-pure-read-with-block-token-optimized.png, 
> symmetric-pure-read-with-block-token.png, symmetric_block_token.htm
>
>
> h3. Context
> Test with [warp|http://https//github.com/minio/warp] to confirm the 
> performance improvement of the symmetric token implementation.
> {code:java}
> warp get -warp-client=10.14.1.{34...40}  --host=localhost:9879 --tls  
> --insecure --access-key=om/[email protected] 
> --secret-key=c7f228ab28ebb00563d5cdbe575a1dfc82d15ca7535cd9b74676f297ed7e23e9 
> --obj.size=10kb --concurrent=40 --duration=10m --bucket 
> warp-benchmark-bucket-fso {code}
> h3. Hardware
> The test was run in an internal secure Ozone cluster, OM & SCM run on servers 
> with ~ 40 cores and 100+GB RAM.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to