Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Gentoo Chat
  • Search

How long does shred take? [solved]

Opinions, ideas and thoughts about Gentoo. Anything and everything about Gentoo except support questions.
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
Author
Message
psutokth
Tux's lil' helper
Tux's lil' helper
Posts: 122
Joined: Sun Apr 03, 2005 1:38 am
Location: Lake Champlain

How long does shred take? [solved]

  • Quote

Post by psutokth » Tue Jul 17, 2007 7:09 pm

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: Select all

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.
Top
blu3bird
Retired Dev
Retired Dev
Posts: 619
Joined: Sat Oct 04, 2003 10:19 am
Location: Munich, Germany

  • Quote

Post by blu3bird » Tue Jul 17, 2007 7:26 pm

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!
Top
timeBandit
Bodhisattva
Bodhisattva
User avatar
Posts: 2719
Joined: Fri Dec 31, 2004 1:54 am
Location: here, there or in transit

  • Quote

Post by timeBandit » Tue Jul 17, 2007 7:31 pm

Well, you can compute an estimate yourself: press Ctrl+Z to suspend shred, then (as root):

Code: Select all

# 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.
Top
psutokth
Tux's lil' helper
Tux's lil' helper
Posts: 122
Joined: Sun Apr 03, 2005 1:38 am
Location: Lake Champlain

  • Quote

Post by psutokth » Tue Jul 17, 2007 7:35 pm

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.
Top
x22
Apprentice
Apprentice
Posts: 208
Joined: Mon Apr 24, 2006 10:19 am

  • Quote

Post by x22 » Wed Jul 18, 2007 9:22 am

That calculations work only if CPU (generating random data) can keep up with drive writing speed.
Top
eccerr0r
Watchman
Watchman
Posts: 10239
Joined: Thu Jul 01, 2004 6:51 pm
Location: almost Mile High in the USA
Contact:
Contact eccerr0r
Website

  • Quote

Post by eccerr0r » Wed Jul 25, 2007 11:22 pm

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 Firepro W2100/24GB DDR3/800GB SSD
What am I supposed watching?
Top
Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Gentoo Chat”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic