Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How long does shred take? [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
psutokth
Tux's lil' helper
Tux's lil' helper


Joined: 03 Apr 2005
Posts: 121
Location: Lake Champlain

PostPosted: Tue Jul 17, 2007 7:09 pm    Post subject: How long does shred take? [solved] Reply with quote

Hi, I'm just curious how much longer my processor will be running full speed and my second drive will be inaccessible.

I ran:
Code:
shred /dev/sda

about 3 hours ago on a 120GB usb 2.0 drive with a measly 2MB buffer. Does anyone have a guess as to how long this will take or a way I can check the progress?


Last edited by psutokth on Tue Jul 17, 2007 7:50 pm; edited 1 time in total
Back to top
View user's profile Send private message
blu3bird
Retired Dev
Retired Dev


Joined: 04 Oct 2003
Posts: 615
Location: Munich, Germany

PostPosted: Tue Jul 17, 2007 7:26 pm    Post subject: Reply with quote

it has a --verbose parameter to show the progress. No way to check if you have started it without that parameter.

How long it takes depends on your hardware but it should take about 28hours.

my formular: (size of harddrive in mb) / (harddrive write speed in mb/s) * (number of times the harddrive is overwritten, default is 25) / 60 / 60 = hours it will take
120000 / 30 * 25 / 60 / 60 = 27.7
_________________
Black Holes are created when God divides by zero!
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2719
Location: here, there or in transit

PostPosted: Tue Jul 17, 2007 7:31 pm    Post subject: Reply with quote

Well, you can compute an estimate yourself: press Ctrl+Z to suspend shred, then (as root):
Code:
# hdparm -tT /dev/sda

/dev/sda:
 Timing cached reads:   1774 MB in  2.00 seconds = 887.14 MB/sec
 Timing buffered disk reads:   20 MB in  3.15 seconds =   6.36 MB/sec
(I did this in a virtual machine so the numbers are wacky.)
Afterwards, give the fg command to resume shred.

Divide your disk size (120GB) by the buffered read figure (6.36MB/s, above) to get the best-case time, in seconds, to read the entire drive once. Since we're talking rough estimates, assume write speeds are similar. In the example this yields 120GB * (1024 MB/GB) / (6.36 MB/s) ~= 19320 s, or about 5h 20m for one pass. A more realistic speed of 40MB/s yields ~51m for one pass, and again that's best case (one big streaming chunk). Figure on actual speed being quite a bit slower.

Now for the really bad news: by default, shred overwrites a file 25 times....

Edit: I see someone already replied while I was checking my figures. Ah well. :)
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
psutokth
Tux's lil' helper
Tux's lil' helper


Joined: 03 Apr 2005
Posts: 121
Location: Lake Champlain

PostPosted: Tue Jul 17, 2007 7:35 pm    Post subject: Reply with quote

Oh wow, there wasn't even anything incriminating on it, but I want to freecycle it. Thanks for the help guys, I think I'll be stopping it long before the 25th pass.
Back to top
View user's profile Send private message
x22
Apprentice
Apprentice


Joined: 24 Apr 2006
Posts: 208

PostPosted: Wed Jul 18, 2007 9:22 am    Post subject: Reply with quote

That calculations work only if CPU (generating random data) can keep up with drive writing speed.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 10006
Location: almost Mile High in the USA

PostPosted: Wed Jul 25, 2007 11:22 pm    Post subject: Reply with quote

I've seen around 20MB/sec hdparm reads from most of my USB hard disks that are larger than 20GB. The best I've seen is around 25MB/sec. That 2MB buffer doesn't affect USB read/writes much. My 2M, 8M disks all behave pretty much the same behind a USB-IDE bridge...

Most of the data on my machines are not really that critical. I tend to do three pass wipes on my disks - two random garbage/data and then a zero pass. I figure that if someone really wants to recover data after that, they're fairly rich and really need not be after my poor data...
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum