You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "dhruba borthakur (JIRA)" <ji...@apache.org> on 2007/08/10 09:05:51 UTC
[jira] Created: (HADOOP-1704) Throttling for HDFS Trash purging
Throttling for HDFS Trash purging
---------------------------------
Key: HADOOP-1704
URL: https://issues.apache.org/jira/browse/HADOOP-1704
Project: Hadoop
Issue Type: Bug
Components: dfs
Reporter: dhruba borthakur
When HDFS Trash is enabled, deletion of a file/directory results in it being moved to the "Trash" directory. The "Trash" directory is periodically purged by the Namenode. This means that all files/directories that users deleted in the last Trash period, gets "really" deleted when the Trash purging occurs. This might cause a burst of file/directory deletions.
The Namenode tracks blocks that belonged to deleted files in a data structure named "RecentInvalidateSets". There is a possibility that Trash purging may cause this data structure to bloat, causing undesireable behaviour of the Namenode.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525464 ]
dhruba borthakur commented on HADOOP-1704:
------------------------------------------
I vote for closing it. Raghu's experiment with deleting 5M files showed no memory related problems.
> Throttling for HDFS Trash purging
> ---------------------------------
>
> Key: HADOOP-1704
> URL: https://issues.apache.org/jira/browse/HADOOP-1704
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Reporter: dhruba borthakur
>
> When HDFS Trash is enabled, deletion of a file/directory results in it being moved to the "Trash" directory. The "Trash" directory is periodically purged by the Namenode. This means that all files/directories that users deleted in the last Trash period, gets "really" deleted when the Trash purging occurs. This might cause a burst of file/directory deletions.
> The Namenode tracks blocks that belonged to deleted files in a data structure named "RecentInvalidateSets". There is a possibility that Trash purging may cause this data structure to bloat, causing undesireable behaviour of the Namenode.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by "Nigel Daley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525472 ]
Nigel Daley commented on HADOOP-1704:
-------------------------------------
I don't see the big deal of leaving this open. Really. Raghu's block crc upgrade code throttles the deletion of .crc files (so I suspect his comments above on this jira are irrelvant). Why not just apply that throttling code to trash as well. It would simply prevent a very large number of block related objects being added to the deletion queue in one go -- and again, we already do this for block crc upgrade.
> Throttling for HDFS Trash purging
> ---------------------------------
>
> Key: HADOOP-1704
> URL: https://issues.apache.org/jira/browse/HADOOP-1704
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Reporter: dhruba borthakur
>
> When HDFS Trash is enabled, deletion of a file/directory results in it being moved to the "Trash" directory. The "Trash" directory is periodically purged by the Namenode. This means that all files/directories that users deleted in the last Trash period, gets "really" deleted when the Trash purging occurs. This might cause a burst of file/directory deletions.
> The Namenode tracks blocks that belonged to deleted files in a data structure named "RecentInvalidateSets". There is a possibility that Trash purging may cause this data structure to bloat, causing undesireable behaviour of the Namenode.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519168 ]
Doug Cutting commented on HADOOP-1704:
--------------------------------------
Shouldn't a file's deletion mostly just shuffle block ids from one list to another? Deletion shouldn't raise the high-water-mark of memory usage, should it?
> Throttling for HDFS Trash purging
> ---------------------------------
>
> Key: HADOOP-1704
> URL: https://issues.apache.org/jira/browse/HADOOP-1704
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Reporter: dhruba borthakur
>
> When HDFS Trash is enabled, deletion of a file/directory results in it being moved to the "Trash" directory. The "Trash" directory is periodically purged by the Namenode. This means that all files/directories that users deleted in the last Trash period, gets "really" deleted when the Trash purging occurs. This might cause a burst of file/directory deletions.
> The Namenode tracks blocks that belonged to deleted files in a data structure named "RecentInvalidateSets". There is a possibility that Trash purging may cause this data structure to bloat, causing undesireable behaviour of the Namenode.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519176 ]
dhruba borthakur commented on HADOOP-1704:
------------------------------------------
In the current code, the namenode sends out only 1000 block deletion requests per heartbeat. This means that the RecentInvalidateSets data structure could get bloated if tons of files get deleted at the same instant. Deleting a file causes the file to get removed from the FsDirectory, but blocks do not get removed from the blocksMap till the next block report from the datanode.
> Throttling for HDFS Trash purging
> ---------------------------------
>
> Key: HADOOP-1704
> URL: https://issues.apache.org/jira/browse/HADOOP-1704
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Reporter: dhruba borthakur
>
> When HDFS Trash is enabled, deletion of a file/directory results in it being moved to the "Trash" directory. The "Trash" directory is periodically purged by the Namenode. This means that all files/directories that users deleted in the last Trash period, gets "really" deleted when the Trash purging occurs. This might cause a burst of file/directory deletions.
> The Namenode tracks blocks that belonged to deleted files in a data structure named "RecentInvalidateSets". There is a possibility that Trash purging may cause this data structure to bloat, causing undesireable behaviour of the Namenode.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by "Raghu Angadi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525484 ]
Raghu Angadi commented on HADOOP-1704:
--------------------------------------
> Raghu's block crc upgrade code throttles the deletion of .crc files.
blockCrc upgrade does not throttle deletes explicitly. It deletes in a single thread and each deletiion results in editsLog entry.. these two naturally throttle the rate to around 700-800 deletes a second. Deleting a directory deletes whole tree with sigle editsLog entry. This is the difference.
The similarity is that that none of these 5M blocks were removed from the namespace until after the upgrade is complete. In that sense memory overhead is same as deleting 5M files in one shot.
> Throttling for HDFS Trash purging
> ---------------------------------
>
> Key: HADOOP-1704
> URL: https://issues.apache.org/jira/browse/HADOOP-1704
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Reporter: dhruba borthakur
>
> When HDFS Trash is enabled, deletion of a file/directory results in it being moved to the "Trash" directory. The "Trash" directory is periodically purged by the Namenode. This means that all files/directories that users deleted in the last Trash period, gets "really" deleted when the Trash purging occurs. This might cause a burst of file/directory deletions.
> The Namenode tracks blocks that belonged to deleted files in a data structure named "RecentInvalidateSets". There is a possibility that Trash purging may cause this data structure to bloat, causing undesireable behaviour of the Namenode.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by "Marco Nicosia (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519028 ]
Marco Nicosia commented on HADOOP-1704:
---------------------------------------
Should this be a blocker before enabling Trash on a large system with many active users?
> Throttling for HDFS Trash purging
> ---------------------------------
>
> Key: HADOOP-1704
> URL: https://issues.apache.org/jira/browse/HADOOP-1704
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Reporter: dhruba borthakur
>
> When HDFS Trash is enabled, deletion of a file/directory results in it being moved to the "Trash" directory. The "Trash" directory is periodically purged by the Namenode. This means that all files/directories that users deleted in the last Trash period, gets "really" deleted when the Trash purging occurs. This might cause a burst of file/directory deletions.
> The Namenode tracks blocks that belonged to deleted files in a data structure named "RecentInvalidateSets". There is a possibility that Trash purging may cause this data structure to bloat, causing undesireable behaviour of the Namenode.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by "dhruba borthakur (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
dhruba borthakur resolved HADOOP-1704.
--------------------------------------
Resolution: Cannot Reproduce
We have not been able to experimentally observe significant increase in memory usage when large number of files are deleted.
> Throttling for HDFS Trash purging
> ---------------------------------
>
> Key: HADOOP-1704
> URL: https://issues.apache.org/jira/browse/HADOOP-1704
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Reporter: dhruba borthakur
>
> When HDFS Trash is enabled, deletion of a file/directory results in it being moved to the "Trash" directory. The "Trash" directory is periodically purged by the Namenode. This means that all files/directories that users deleted in the last Trash period, gets "really" deleted when the Trash purging occurs. This might cause a burst of file/directory deletions.
> The Namenode tracks blocks that belonged to deleted files in a data structure named "RecentInvalidateSets". There is a possibility that Trash purging may cause this data structure to bloat, causing undesireable behaviour of the Namenode.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by Nigel Daley <nd...@yahoo-inc.com>.
I don't think this should be closed until we have tested this
hypothesis.
On Sep 5, 2007, at 4:25 PM, eric baldeschwieler (JIRA) wrote:
>
> [ https://issues.apache.org/jira/browse/HADOOP-1704?
> page=com.atlassian.jira.plugin.system.issuetabpanels:comment-
> tabpanel#action_12525255 ]
>
> eric baldeschwieler commented on HADOOP-1704:
> ---------------------------------------------
>
> so is this a real issue, or can we close it?
>
> Sounds like a hypothetical concern that has never been observed.
>
>> Throttling for HDFS Trash purging
>> ---------------------------------
>>
>> Key: HADOOP-1704
>> URL: https://issues.apache.org/jira/browse/
>> HADOOP-1704
>> Project: Hadoop
>> Issue Type: Bug
>> Components: dfs
>> Reporter: dhruba borthakur
>>
>> When HDFS Trash is enabled, deletion of a file/directory results
>> in it being moved to the "Trash" directory. The "Trash" directory
>> is periodically purged by the Namenode. This means that all files/
>> directories that users deleted in the last Trash period, gets
>> "really" deleted when the Trash purging occurs. This might cause a
>> burst of file/directory deletions.
>> The Namenode tracks blocks that belonged to deleted files in a
>> data structure named "RecentInvalidateSets". There is a
>> possibility that Trash purging may cause this data structure to
>> bloat, causing undesireable behaviour of the Namenode.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
[jira] Commented: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by "eric baldeschwieler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525255 ]
eric baldeschwieler commented on HADOOP-1704:
---------------------------------------------
so is this a real issue, or can we close it?
Sounds like a hypothetical concern that has never been observed.
> Throttling for HDFS Trash purging
> ---------------------------------
>
> Key: HADOOP-1704
> URL: https://issues.apache.org/jira/browse/HADOOP-1704
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Reporter: dhruba borthakur
>
> When HDFS Trash is enabled, deletion of a file/directory results in it being moved to the "Trash" directory. The "Trash" directory is periodically purged by the Namenode. This means that all files/directories that users deleted in the last Trash period, gets "really" deleted when the Trash purging occurs. This might cause a burst of file/directory deletions.
> The Namenode tracks blocks that belonged to deleted files in a data structure named "RecentInvalidateSets". There is a possibility that Trash purging may cause this data structure to bloat, causing undesireable behaviour of the Namenode.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525470 ]
Doug Cutting commented on HADOOP-1704:
--------------------------------------
The problem is that applications can also easily delete large chunks of the filesystem already. So I don't see this as a Trash-specific issue. Perhaps we can open a new issue generically about namenode memory use for large deletes? I suppose the ultimate goal there would be to be able to delete the entire filesystem without growing the heap at all? Would anything less satisfy folks? Should we also file issues about adding or opening lots of files at once? Seriously, we could, based on the available heap and our knowledge of the size of various data structures, try to limit activity to always stay within the heap, returning application exceptions (TooManyFiles) when these may be exceeded. Short of that, I don't see how we can really address stuff like this without a major re-write of the namenode, so that it does not use single-host, memory-resident datastructures for each file and block.
+1 for closing it.
> Throttling for HDFS Trash purging
> ---------------------------------
>
> Key: HADOOP-1704
> URL: https://issues.apache.org/jira/browse/HADOOP-1704
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Reporter: dhruba borthakur
>
> When HDFS Trash is enabled, deletion of a file/directory results in it being moved to the "Trash" directory. The "Trash" directory is periodically purged by the Namenode. This means that all files/directories that users deleted in the last Trash period, gets "really" deleted when the Trash purging occurs. This might cause a burst of file/directory deletions.
> The Namenode tracks blocks that belonged to deleted files in a data structure named "RecentInvalidateSets". There is a possibility that Trash purging may cause this data structure to bloat, causing undesireable behaviour of the Namenode.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12525486 ]
Doug Cutting commented on HADOOP-1704:
--------------------------------------
> Why not just apply that throttling code to trash as well?
If this is really a problem, that wouldn't fix it when an application deletes a bunch of files. So, if throttling is required for deletions, we should implement it generically, either on the namenode or in DFSClient. But, as of yet, there's no evidence that throttling is required.
> Throttling for HDFS Trash purging
> ---------------------------------
>
> Key: HADOOP-1704
> URL: https://issues.apache.org/jira/browse/HADOOP-1704
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Reporter: dhruba borthakur
>
> When HDFS Trash is enabled, deletion of a file/directory results in it being moved to the "Trash" directory. The "Trash" directory is periodically purged by the Namenode. This means that all files/directories that users deleted in the last Trash period, gets "really" deleted when the Trash purging occurs. This might cause a burst of file/directory deletions.
> The Namenode tracks blocks that belonged to deleted files in a data structure named "RecentInvalidateSets". There is a possibility that Trash purging may cause this data structure to bloat, causing undesireable behaviour of the Namenode.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by "Raghu Angadi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12520854 ]
Raghu Angadi commented on HADOOP-1704:
--------------------------------------
In a recent test of block crc upgrade, Namenode deleted 5M .crc files in SafeMode without apparent increase in memory. The datanodes were asked to delete the blocks right after SafeMode was off. Each datanode was asked to delete 16k blocks in total. Even during this time there was no noticeable increase in memory (may be less than 5-10%).
> Throttling for HDFS Trash purging
> ---------------------------------
>
> Key: HADOOP-1704
> URL: https://issues.apache.org/jira/browse/HADOOP-1704
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Reporter: dhruba borthakur
>
> When HDFS Trash is enabled, deletion of a file/directory results in it being moved to the "Trash" directory. The "Trash" directory is periodically purged by the Namenode. This means that all files/directories that users deleted in the last Trash period, gets "really" deleted when the Trash purging occurs. This might cause a burst of file/directory deletions.
> The Namenode tracks blocks that belonged to deleted files in a data structure named "RecentInvalidateSets". There is a possibility that Trash purging may cause this data structure to bloat, causing undesireable behaviour of the Namenode.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
Re: [jira] Commented: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by Nigel Daley <nd...@yahoo-inc.com>.
+1 to Doug's comments. I believe DFS Block CRC Upgrade already does
this throttling for it's own purposes (deleting large numbers of .crc
files).
On Aug 10, 2007, at 2:43 PM, Doug Cutting (JIRA) wrote:
>
> [ https://issues.apache.org/jira/browse/HADOOP-1704?
> page=com.atlassian.jira.plugin.system.issuetabpanels:comment-
> tabpanel#action_12519134 ]
>
> Doug Cutting commented on HADOOP-1704:
> --------------------------------------
>
> If any throttling is required, it should be in the namenode. The
> namenode should be capable of handling requests like 'rmr /'
> without running out of memory, no? So perhaps file and directory
> deletions should be queued within the namenode, based on the size
> of RecentInvalidateSets, rather than altering the Trash mechanism
> to more slowly delete things.
>
>> Throttling for HDFS Trash purging
>> ---------------------------------
>>
>> Key: HADOOP-1704
>> URL: https://issues.apache.org/jira/browse/
>> HADOOP-1704
>> Project: Hadoop
>> Issue Type: Bug
>> Components: dfs
>> Reporter: dhruba borthakur
>>
>> When HDFS Trash is enabled, deletion of a file/directory results
>> in it being moved to the "Trash" directory. The "Trash" directory
>> is periodically purged by the Namenode. This means that all files/
>> directories that users deleted in the last Trash period, gets
>> "really" deleted when the Trash purging occurs. This might cause a
>> burst of file/directory deletions.
>> The Namenode tracks blocks that belonged to deleted files in a
>> data structure named "RecentInvalidateSets". There is a
>> possibility that Trash purging may cause this data structure to
>> bloat, causing undesireable behaviour of the Namenode.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
[jira] Commented: (HADOOP-1704) Throttling for HDFS Trash purging
Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12519134 ]
Doug Cutting commented on HADOOP-1704:
--------------------------------------
If any throttling is required, it should be in the namenode. The namenode should be capable of handling requests like 'rmr /' without running out of memory, no? So perhaps file and directory deletions should be queued within the namenode, based on the size of RecentInvalidateSets, rather than altering the Trash mechanism to more slowly delete things.
> Throttling for HDFS Trash purging
> ---------------------------------
>
> Key: HADOOP-1704
> URL: https://issues.apache.org/jira/browse/HADOOP-1704
> Project: Hadoop
> Issue Type: Bug
> Components: dfs
> Reporter: dhruba borthakur
>
> When HDFS Trash is enabled, deletion of a file/directory results in it being moved to the "Trash" directory. The "Trash" directory is periodically purged by the Namenode. This means that all files/directories that users deleted in the last Trash period, gets "really" deleted when the Trash purging occurs. This might cause a burst of file/directory deletions.
> The Namenode tracks blocks that belonged to deleted files in a data structure named "RecentInvalidateSets". There is a possibility that Trash purging may cause this data structure to bloat, causing undesireable behaviour of the Namenode.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.