You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Yiqun Lin (Jira)" <ji...@apache.org> on 2020/09/28 15:56:00 UTC
[jira] [Commented] (HDDS-4285) Read is slow due to the frequent
usage of UGI.getCurrentUserCall()
[ https://issues.apache.org/jira/browse/HDDS-4285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17203321#comment-17203321 ]
Yiqun Lin commented on HDDS-4285:
---------------------------------
Looking into this, I am thinking of two approaches for this:
1. Get UGI instance in ChunkInputStream (or other invoke places), then set UGI in XceiverClientSpi, extract UGI and get token string in ContainerProtocolCalls method.
2. Make UGI as a thread local field in ContainerProtocolCalls, and then set UGI in ChunkInputStream or other similar places.
#1 is a more generic approach, UGI stored in XceiverClientSpi can be reused in other places.
> Read is slow due to the frequent usage of UGI.getCurrentUserCall()
> ------------------------------------------------------------------
>
> Key: HDDS-4285
> URL: https://issues.apache.org/jira/browse/HDDS-4285
> Project: Hadoop Distributed Data Store
> Issue Type: Improvement
> Reporter: Marton Elek
> Assignee: Marton Elek
> Priority: Major
> Attachments: image-2020-09-28-16-19-17-581.png, profile-20200928-161631-180518.svg
>
>
> Ozone read operation turned out to be slow mainly because we do a new UGI.getCurrentUser for block token for each of the calls.
> We need to cache the block token / UGI.getCurrentUserCall() to make it faster.
> !image-2020-09-28-16-19-17-581.png!
> To reproduce:
> Checkout: https://github.com/elek/hadoop-ozone/tree/mocked-read
> {code}
> cd hadoop-ozone/client
> export MAVEN_OPTS=-agentpath:/home/elek/prog/async-profiler/build/libasyncProfiler.so=start,file=/tmp/profile-%t-%p.svg
> mvn compile exec:java -Dexec.mainClass=org.apache.hadoop.ozone.client.io.TestKeyOutputStreamUnit -Dexec.classpathScope=test
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org