You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Todd Lipcon (Created) (JIRA)" <ji...@apache.org> on 2012/04/14 04:33:17 UTC

[jira] [Created] (HDFS-3280) DFSOutputStream.sync should not be synchronized

DFSOutputStream.sync should not be synchronized
-----------------------------------------------

                 Key: HDFS-3280
                 URL: https://issues.apache.org/jira/browse/HDFS-3280
             Project: Hadoop HDFS
          Issue Type: Bug
          Components: hdfs client
    Affects Versions: 2.0.0
            Reporter: Todd Lipcon
            Assignee: Todd Lipcon
            Priority: Critical


HDFS-895 added an optimization to make hflush() much faster by unsynchronizing it. But, we forgot to un-synchronize the deprecated {{sync()}} wrapper method. This makes the HBase WAL really slow on 0.23+ since it doesn't take advantage of HDFS-895 anymore.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3280) DFSOutputStream.sync should not be synchronized

Posted by "Aaron T. Myers (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13253946#comment-13253946 ] 

Aaron T. Myers commented on HDFS-3280:
--------------------------------------

+1 pending Jenkins. 
                
> DFSOutputStream.sync should not be synchronized
> -----------------------------------------------
>
>                 Key: HDFS-3280
>                 URL: https://issues.apache.org/jira/browse/HDFS-3280
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs client
>    Affects Versions: 2.0.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>         Attachments: hdfs-3280.txt
>
>
> HDFS-895 added an optimization to make hflush() much faster by unsynchronizing it. But, we forgot to un-synchronize the deprecated {{sync()}} wrapper method. This makes the HBase WAL really slow on 0.23+ since it doesn't take advantage of HDFS-895 anymore.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-3280) DFSOutputStream.sync should not be synchronized

Posted by "Todd Lipcon (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HDFS-3280:
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0
     Hadoop Flags: Reviewed
           Status: Resolved  (was: Patch Available)

Committed to branch-2 (as noted above, this problem isn't present in trunk since sync() was removed).

Thanks also to Matteo Bertozzi and Jon Hsieh for their help tracking this issue down.
                
> DFSOutputStream.sync should not be synchronized
> -----------------------------------------------
>
>                 Key: HDFS-3280
>                 URL: https://issues.apache.org/jira/browse/HDFS-3280
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs client
>    Affects Versions: 2.0.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 2.0.0
>
>         Attachments: hdfs-3280.txt
>
>
> HDFS-895 added an optimization to make hflush() much faster by unsynchronizing it. But, we forgot to un-synchronize the deprecated {{sync()}} wrapper method. This makes the HBase WAL really slow on 0.23+ since it doesn't take advantage of HDFS-895 anymore.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3280) DFSOutputStream.sync should not be synchronized

Posted by "Hadoop QA (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13253948#comment-13253948 ] 

Hadoop QA commented on HDFS-3280:
---------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12522653/hdfs-3280.txt
  against trunk revision .

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    -1 patch.  The patch command could not apply the patch.

Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/2277//console

This message is automatically generated.
                
> DFSOutputStream.sync should not be synchronized
> -----------------------------------------------
>
>                 Key: HDFS-3280
>                 URL: https://issues.apache.org/jira/browse/HDFS-3280
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs client
>    Affects Versions: 2.0.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>         Attachments: hdfs-3280.txt
>
>
> HDFS-895 added an optimization to make hflush() much faster by unsynchronizing it. But, we forgot to un-synchronize the deprecated {{sync()}} wrapper method. This makes the HBase WAL really slow on 0.23+ since it doesn't take advantage of HDFS-895 anymore.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3280) DFSOutputStream.sync should not be synchronized

Posted by "Todd Lipcon (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13253941#comment-13253941 ] 

Todd Lipcon commented on HDFS-3280:
-----------------------------------

Verified that this increased my benchmark performance by a factor of two.
                
> DFSOutputStream.sync should not be synchronized
> -----------------------------------------------
>
>                 Key: HDFS-3280
>                 URL: https://issues.apache.org/jira/browse/HDFS-3280
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs client
>    Affects Versions: 2.0.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>         Attachments: hdfs-3280.txt
>
>
> HDFS-895 added an optimization to make hflush() much faster by unsynchronizing it. But, we forgot to un-synchronize the deprecated {{sync()}} wrapper method. This makes the HBase WAL really slow on 0.23+ since it doesn't take advantage of HDFS-895 anymore.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3280) DFSOutputStream.sync should not be synchronized

Posted by "Andrew Purtell (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13253942#comment-13253942 ] 

Andrew Purtell commented on HDFS-3280:
--------------------------------------

Ah, so this explains what you guys thought might be an interaction with Nagle?
                
> DFSOutputStream.sync should not be synchronized
> -----------------------------------------------
>
>                 Key: HDFS-3280
>                 URL: https://issues.apache.org/jira/browse/HDFS-3280
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs client
>    Affects Versions: 2.0.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>         Attachments: hdfs-3280.txt
>
>
> HDFS-895 added an optimization to make hflush() much faster by unsynchronizing it. But, we forgot to un-synchronize the deprecated {{sync()}} wrapper method. This makes the HBase WAL really slow on 0.23+ since it doesn't take advantage of HDFS-895 anymore.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-3280) DFSOutputStream.sync should not be synchronized

Posted by "Todd Lipcon (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HDFS-3280:
------------------------------

    Attachment: hdfs-3280.txt

Trivial patch should fix the issue. I'll verify with an HLog benchmark on a cluster as well.

This is definitely correct since the method is just a one-line call to another method which is unsynchronized.
                
> DFSOutputStream.sync should not be synchronized
> -----------------------------------------------
>
>                 Key: HDFS-3280
>                 URL: https://issues.apache.org/jira/browse/HDFS-3280
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs client
>    Affects Versions: 2.0.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>         Attachments: hdfs-3280.txt
>
>
> HDFS-895 added an optimization to make hflush() much faster by unsynchronizing it. But, we forgot to un-synchronize the deprecated {{sync()}} wrapper method. This makes the HBase WAL really slow on 0.23+ since it doesn't take advantage of HDFS-895 anymore.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (HDFS-3280) DFSOutputStream.sync should not be synchronized

Posted by "Todd Lipcon (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HDFS-3280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13253951#comment-13253951 ] 

Todd Lipcon commented on HDFS-3280:
-----------------------------------

bq. Ah, so this explains what you guys thought might be an interaction with Nagle?

Yep, turned out to be much simpler :)

The patch failed on Hudson due to HDFS-3034 having removed the deprecated method. I'll commit this based on Aaron's +1 and based on my manual stress testing using HBase's HLog class, which uses this method.

No unit tests since it's hard to unit test for performance, and the hflush equivalent is already tested by TestMultithreadedHflush
                
> DFSOutputStream.sync should not be synchronized
> -----------------------------------------------
>
>                 Key: HDFS-3280
>                 URL: https://issues.apache.org/jira/browse/HDFS-3280
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs client
>    Affects Versions: 2.0.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>         Attachments: hdfs-3280.txt
>
>
> HDFS-895 added an optimization to make hflush() much faster by unsynchronizing it. But, we forgot to un-synchronize the deprecated {{sync()}} wrapper method. This makes the HBase WAL really slow on 0.23+ since it doesn't take advantage of HDFS-895 anymore.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (HDFS-3280) DFSOutputStream.sync should not be synchronized

Posted by "Todd Lipcon (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HDFS-3280?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated HDFS-3280:
------------------------------

    Status: Patch Available  (was: Open)
    
> DFSOutputStream.sync should not be synchronized
> -----------------------------------------------
>
>                 Key: HDFS-3280
>                 URL: https://issues.apache.org/jira/browse/HDFS-3280
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: hdfs client
>    Affects Versions: 2.0.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>         Attachments: hdfs-3280.txt
>
>
> HDFS-895 added an optimization to make hflush() much faster by unsynchronizing it. But, we forgot to un-synchronize the deprecated {{sync()}} wrapper method. This makes the HBase WAL really slow on 0.23+ since it doesn't take advantage of HDFS-895 anymore.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira