Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Improvement]LocalStorage init use multi thread #71

Closed
xianjingfeng opened this issue Jul 26, 2022 · 11 comments
Closed

[Improvement]LocalStorage init use multi thread #71

xianjingfeng opened this issue Jul 26, 2022 · 11 comments

Comments

@xianjingfeng
Copy link
Member

xianjingfeng commented Jul 26, 2022

We have multi disk in a host. If shuffle server exit abnormally, there will be many files need to be clear when shuffle server start again and this operation will cost a lot of time

@jerqi
Copy link
Contributor

jerqi commented Jul 26, 2022

How much time will it take to execute the operation? Could you provide some concrete data?

@colinmjj
Copy link

@xianjingfeng I think clear unnecessary data before start shuffle server by Linux command is a better way, and clear process during shuffle server startup is a backup solution.
I prefer to improve start script to do such thing.

@xianjingfeng
Copy link
Member Author

How much time will it take to execute the operation? Could you provide some concrete data?

more that 30 seconds per disk, it dependency disk performance and usage.

@jerqi
Copy link
Contributor

jerqi commented Jul 26, 2022

How much time will it take to execute the operation? Could you provide some concrete data?

more that 30 seconds per disk, it dependency disk performance and usage.

What's the type of disk that you use? The performance of disk is a little strange. We only delete one directory on every disk, it shouldn't take so much time.

@xianjingfeng
Copy link
Member Author

How much time will it take to execute the operation? Could you provide some concrete data?

more that 30 seconds per disk, it dependency disk performance and usage.

What's the type of disk that you use? The performance of disk is a little strange. We only delete one directory on every disk, it shouldn't take so much time.

hdd, about 1T usage per disk

@xianjingfeng
Copy link
Member Author

@xianjingfeng I think clear unnecessary data before start shuffle server by Linux command is a better way, and clear process during shuffle server startup is a backup solution. I prefer to improve start script to do such thing.

if do this in start scirpt, we need parse conf file in start script, i think it is heavy for start script and it is difficult to maintain

@xianjingfeng
Copy link
Member Author

How much time will it take to execute the operation? Could you provide some concrete data?

more that 30 seconds per disk, it dependency disk performance and usage.

What's the type of disk that you use? The performance of disk is a little strange. We only delete one directory on every disk, it shouldn't take so much time.

FileUtils.deleteDirectory will delete it's childrens first

@jerqi
Copy link
Contributor

jerqi commented Jul 26, 2022

How much time will it take to execute the operation? Could you provide some concrete data?

more that 30 seconds per disk, it dependency disk performance and usage.

What's the type of disk that you use? The performance of disk is a little strange. We only delete one directory on every disk, it shouldn't take so much time.

FileUtils.deleteDirectory will delete it's childrens first

Ok, I got it. It's ok for me to use multi-thread to do cleanup operation.

@frankliee
Copy link
Contributor

How much time will it take to execute the operation? Could you provide some concrete data?

more that 30 seconds per disk, it dependency disk performance and usage.

What's the type of disk that you use? The performance of disk is a little strange. We only delete one directory on every disk, it shouldn't take so much time.

FileUtils.deleteDirectory will delete it's childrens first

How much time will it take to execute the operation? Could you provide some concrete data?

more that 30 seconds per disk, it dependency disk performance and usage.

What's the type of disk that you use? The performance of disk is a little strange. We only delete one directory on every disk, it shouldn't take so much time.

hdd, about 1T usage per disk

How many files are deleted in your disk ? Uniffle has merged data in each partition, so there will not exist very large number of files. Can you do a simple test by using rm -rf

@xianjingfeng
Copy link
Member Author

How much time will it take to execute the operation? Could you provide some concrete data?

more that 30 seconds per disk, it dependency disk performance and usage.

What's the type of disk that you use? The performance of disk is a little strange. We only delete one directory on every disk, it shouldn't take so much time.

FileUtils.deleteDirectory will delete it's childrens first

How much time will it take to execute the operation? Could you provide some concrete data?

more that 30 seconds per disk, it dependency disk performance and usage.

What's the type of disk that you use? The performance of disk is a little strange. We only delete one directory on every disk, it shouldn't take so much time.

hdd, about 1T usage per disk

How many files are deleted in your disk ? Uniffle has merged data in each partition, so there will not exist very large number of files. Can you do a simple test by using rm -rf

I neither count how many files nor test by using rm -rf , i will try to do this recently

jerqi pushed a commit that referenced this issue Jul 29, 2022
### **What changes were proposed in this pull request?**
solve issue #71, use multi thread to clean local storage

### **Why are the changes needed?**
If shuffle server exit abnormally, there will be many files need to be clear when shuffle server start again and this operation will cost a lot of time

### **Does this PR introduce any user-facing change?**
No

### **How was this patch tested?**
Add new ut
@jerqi
Copy link
Contributor

jerqi commented Jul 29, 2022

solved by pr #72

@jerqi jerqi closed this as completed Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants