Link to home
Start Free TrialLog in
Avatar of Systemadministration
Systemadministration

asked on

rm huge backup file freezes web server

Hi experts,

I found a problem on an Ubuntu-server (ext3) when deleting huge backup-files (50GB).
While deleting with "rm -r" I  the webserver apache will freeze for 1 minute.
I think it is because if the I/O load.

On a forum I found that using "ionice" would help.
So I could try using following:

ionice -c2 -n7 rm -r /path/to/the/backup_file

Open in new window


Do you think it is fine to use this?
Do you have an idea how long the deletion process would take? Without ionice it takes abot 4 minutes to delete a file with 50GB.

The goal is deleting the huge file while the server is running and the website should not be influenced.
Avatar of Thomas Wheeler
Thomas Wheeler

Sounds like your need to figure out whats going on with your disk. What type of setup is this? Is it one drive, a raid or an iscsi mount? Deleting this file should not cause this result. Are there errors in the logs?
Avatar of Systemadministration

ASKER

This seems to be a known problem:
http://serverfault.com/questions/480526/deleting-very-large-file-without-webserver-freezing

My question is only about ionice.
ASKER CERTIFIED SOLUTION
Avatar of Phil Phillips
Phil Phillips
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Great!
Truncation the 56GB file only took a few seconds. After that tha space was free again and I could delete the truncated file without risk.