SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-01-2006, 05:02 PM
rdefino rdefino is offline
Sage Fanatic
 
Join Date: Aug 2006
Posts: 771
Should I defrag my drives?

I have all my recordings on a raid 5 set of 3TB. Now since I'm recording and deleting shows alot, I guess I would have alot of fragmenting. Is it wise to defrag? Can it be done safely on a raid volume?

Thanks
__________________
SageTv server: 2008 64 BIT R2, Asus MN2-E, AMD dual core 4200, 4gb ram, Promise raid 5 8TB, 80gb Sata boot drive w/OS, 2/ dual tuner HDhomeruns, HD-PVR

3/HD-100's, 1/HD-200
Reply With Quote
  #2  
Old 12-01-2006, 06:20 PM
StephaneM's Avatar
StephaneM StephaneM is offline
Sage Icon
 
Join Date: Mar 2006
Location: France
Posts: 1,463
Hello,
Quote:
Originally Posted by rdefino
Is it wise to defrag? Can it be done safely on a raid volume?
You can defrag safely (though my RAID5 array crashed 3 weeks ago during defrag but fortunately no data was lost).

But I don't think it is worth it. It will make your drives suffer a lot : defragging Gigs of data is very intensive especially with a RAID5 array and if your block size is a big one well fragmentation is not so a problem.

So basically defragging your drives will reduce their life a lot.

However it's wise to defrag your drives right after Windows setup and application installation.

Regards,
Stéphane.
Reply With Quote
  #3  
Old 12-01-2006, 06:35 PM
blade blade is offline
SageTVaholic
 
Join Date: Jan 2005
Posts: 2,500
Some people swear defragging improves performance for them. I've heard stories about sluggish menus and the spinning Sage icon going away after defragging the recording drives. Some people claim it fixed their stuttering recordings (when already using 64k clusters).

I've had Sage setup for nearly 2 years and haven't defragged once. Many others have been running even longer and never defrag. I have no response problems, stuttering, etc... IMO if you aren't having performance problems don't bother.

Typically someone will tell you how defragging reduces the wear on your drives. I would agree with this if you're storing recordings for long term use; however, for recordings you don't intend to keep you're creating as much if not more wear on the drive by defragging.
Reply With Quote
  #4  
Old 12-02-2006, 07:05 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
I defrag maybe once every 6 months or so... I occasionally run the report, and when I see that loads of files have several tens of thousands of fragments, I think that its time for a cleanup...

The problem is that Window's defragger is not very good with large files and lots of fragments, so I use a combination of it and SysInternals 'Contig'

My defrag batch file follows (my recording drives are e: and g
Code:
defrag g: -f -v
Contig.exe -s g:\*.*
defrag g: -f -v
Contig.exe -s g:\*.*
defrag g: -f -v

defrag e: -f -v
Contig.exe -s e:\*.*
defrag e: -f -v
Contig.exe -s e:\*.*
defrag e: -f -v
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #5  
Old 12-02-2006, 10:50 PM
Pumpkinhead's Avatar
Pumpkinhead Pumpkinhead is offline
Sage User
 
Join Date: Nov 2004
Location: Illinois
Posts: 71
The general rule is that you should never defrag a drive unless you have a full backup.

Having said that, I never defrag video drives, whether for Sage, Video editing, etc. I only defrag my system drives every several months. Using timed benchmarks, there is sometimes an ever so slight performance increase in launching an application by defragging the system drive.
Reply With Quote
  #6  
Old 12-03-2006, 08:13 AM
DIBU's Avatar
DIBU DIBU is offline
Sage Expert
 
Join Date: Jul 2004
Location: Germany / Hessen / RheinMain
Posts: 512
i use this:

http://www.iobit.com/SmartDefrag/download.html

and i have never a problem with this product (freeware) on my server
__________________
Sage V7x:
Server - Lenovo K320 with WindowsHomeServer2011, 10 Terabyte HD's on stablebit drivepool, (1 x DuoFlex CT Octopus PCIe DVB-C 4 Tuner all with LM-DVB-SmartRecorder, dbox2, run SageTV as Service, DeskNow Mail and Collaboration server, 2 Terabyte NAS (Ximeta) as seconf backup, 1Gb/s MSI ePower HD Network, 3xHD100, 1xHD200, 1xHD300, Panasonic LCD 55" TV, Sharp LCD TV, JVC LCD TV, Touchscreen LCD, PlaceShifter
cu at http://www.dbuschek.de
Reply With Quote
  #7  
Old 12-03-2006, 01:45 PM
Polypro Polypro is offline
Sage Icon
 
Join Date: Jun 2005
Posts: 1,804
Until recently I used Diskeeper 10's "Set it and forget it" to defrag all my drives. It did a good job and never interfered with anything. With Diskeeper 2007's "Intellisense", the CPU is constantly used for defragging...I didn't like it. I switched to Raxco Perfect Disk 8.x and like it better. With 64k clusters I guess you don't need to defrag, but I do anyway. I also use Sprinrite 6 every few months as preventative maintenance.

P
Reply With Quote
  #8  
Old 12-03-2006, 03:12 PM
Mark SS Mark SS is offline
Sage Expert
 
Join Date: Dec 2005
Location: London, UK
Posts: 608
Quote:
Originally Posted by StephaneM
So basically defragging your drives will reduce their life a lot.
Stephane that is absolute nonsense. A typical user who keeps some of his files for long periods, records and deletes other frequently, will reduce more than likely reduce the distance his drive heads travel over the long term.

That said, defragging or not is unlikely to have any measurable effect on the lifespan of a drive.
Reply With Quote
  #9  
Old 12-03-2006, 04:06 PM
blade blade is offline
SageTVaholic
 
Join Date: Jan 2005
Posts: 2,500
Quote:
Originally Posted by Mark SS
Stephane that is absolute nonsense. A typical user who keeps some of his files for long periods, records and deletes other frequently, will reduce more than likely reduce the distance his drive heads travel over the long term.
The argument about lifespan and defragging or not defragging has been going on for ages and I highly doubt it will be settled here.

A recording drive isn't anywhere near typically usage. For one you're using sectors that are 16 times larger than what is typical. Also often times recordings are only accessed once or twice before being deleted. You have to remember the heads are having to jump around during the defragging process to move gigabytes of data around compared to reading once and then deleting. Also when defragging you're reading and re-writing to the disk. So yes you may save a little wear on the heads, but you are without a doubt increasing the number of reads and writes to the disk.

Quote:
That said, defragging or not is unlikely to have any measurable effect on the lifespan of a drive.
That is the age long debate. Personally I just don't see the need to rearrange gigabytes worth of data if there are no performance benefits and if as you say there isn't any measurable effect on lifespan either way why bother?

Last edited by blade; 12-03-2006 at 04:10 PM.
Reply With Quote
  #10  
Old 12-03-2006, 06:26 PM
StephaneM's Avatar
StephaneM StephaneM is offline
Sage Icon
 
Join Date: Mar 2006
Location: France
Posts: 1,463
Quote:
Originally Posted by Mark SS
Stephane that is absolute nonsense. A typical user who keeps some of his files for long periods, records and deletes other frequently, will reduce more than likely reduce the distance his drive heads travel over the long term.
Well, I have 32 computers here and believe me or not, the computers who drives are failing every two years are those where the drives are heavily used and the PC that do extensive usage on HDD here are my Media PCs and Backup PCs. All other PC are servers (Web Servers / Mail Servers / Database Server).

I'm not saying that defregmentation is reducing disk drive life. I'm saying that defragging hard drives that are part of a RAID5 array and containing files that are GB sized is reducing the hard drive life. After all a typical defrag for this kind of setup result in hard drive intense activity for about 2 hours... (this will be especially worse if the drivers are stacked and not cooled enough).

So you can really trust me on this : I do have drives on servers that are 10 years old or more. But drives on my media PCs will last two or three years (I was defragging drives weekly). Now I don't defrag anymore because I really do think that :

1) it does not help for video playback quality (or you would have to defrag after recording and before watching)
2) it spares the drive, after all I only watch my recording once and they get deleted and recordings that I want to keep I recompress them in Xvid and the resulting Xvid file is never fragmented. So regarding the overal head travel distance thing : not defragging for me really reduce the overall load on the drives.

But for any other configurations deffraging doesn't impact at all drive life (I defrag my servers).

In my opinion the best setup for HTPC should be :

* A RAID5 array for OS and recordings
* A RAID0 array for live recordings (and possibly windows page file : to verify i don't know what will happen if a drive fail then => instant windows crash ?)

The RAID5 array should defragged upon Windows / Software installation

After each recording : move the recording from the RAID0 array to the RAID5 array => this way the recording will not be fragmented on the RAID5 array.

This kind of setup is possible with Intel raid chipset and the benefits are :

1) Having a secure array for OS and your recordings
2) Having a fast write array for live recordings
3) Reduce the need of defragging large files

Regards,
Stéphane.
Reply With Quote
  #11  
Old 12-03-2006, 06:46 PM
Mark SS Mark SS is offline
Sage Expert
 
Join Date: Dec 2005
Location: London, UK
Posts: 608
Quote:
Originally Posted by blade
That is the age long debate. Personally I just don't see the need to rearrange gigabytes worth of data if there are no performance benefits and if as you say there isn't any measurable effect on lifespan either way why bother?
Following our previous 'debate' on the issue I'm leaving a drive to get into a right old fragmented mess so I can at least offer some stats to backup the performance aspect
Reply With Quote
  #12  
Old 12-03-2006, 08:34 PM
Goodspike's Avatar
Goodspike Goodspike is offline
Sage Expert
 
Join Date: Jul 2005
Posts: 599
I think defrag is mainly a performance thing. I believe the moving of the heads is all electro-magnetic (motor-like) and thus not likely to cause wear. If a drive goes out, it's more likely to be the main bearings supporting the platters, not the bearing that allows the arm to move back and forth.
Reply With Quote
  #13  
Old 12-03-2006, 09:45 PM
blade blade is offline
SageTVaholic
 
Join Date: Jan 2005
Posts: 2,500
Quote:
Originally Posted by Mark SS
Following our previous 'debate' on the issue I'm leaving a drive to get into a right old fragmented mess so I can at least offer some stats to backup the performance aspect
I'll be interested to see if you can find any performance difference between a fragmented and defragged recording drive.

I just checked mine again and as usual:

Total Fragmentation: 50%
File Fragmentation: 99%
Free Space Fragmentation: 2%

My most heavily fragmented files:
5.80GB with 5,541 fragments
11.92GB with 4,606 fragments
9.40GB with 3,667 fragments

January will be 2 years without defragging and no stuttering or other performance problems as of yet.
Reply With Quote
  #14  
Old 12-03-2006, 09:48 PM
GTwannabe's Avatar
GTwannabe GTwannabe is offline
Sage Aficionado
 
Join Date: Dec 2004
Posts: 434
Defragging an active recording drive is a lost cause. Because you're constantly writing to the drive, you're instantly hosing any contiguous free space the defrag utility is able to allocate.

As far as performance, my 99% fragmented 64k-cluster video drives have no trouble streaming to multiple clients. It's a meager server, but it handles SageTV and webserver duties superbly.
__________________
Intel NUC SageTV 7 server - HDHomeRun PRIME - 2TB iSCSI ReadyNAS storage
Intel i3 HTPC SageTV 7 Client - Win 7 x64 - Onkyo TX-674
Reply With Quote
  #15  
Old 12-04-2006, 01:20 AM
Goodspike's Avatar
Goodspike Goodspike is offline
Sage Expert
 
Join Date: Jul 2005
Posts: 599
Video isn't a terribly demanding use of a hard drive--especially with 64k clusters. Apples and oranges, but the first SD Tivos were only 4500 RPM drives.

I'd not really thought about this until someone mentioned it early in the year, but one place you will notice a performance difference in defraging is doing a anti-virus scan of your complete drive (or presumably any other complete scan). Apparently all those little seeks add up. It would probably be even faster with a defragmentor that sorted the files alphabetically by directory, since that's how AV programs tend to scan.
Reply With Quote
  #16  
Old 12-04-2006, 03:05 AM
Mark SS Mark SS is offline
Sage Expert
 
Join Date: Dec 2005
Location: London, UK
Posts: 608
Quote:
Originally Posted by blade
I'll be interested to see if you can find any performance difference between a fragmented and defragged recording drive.
Exactly why I thought I'd try and check, its interesting

One of my profesional hats is SQL Server DBA so monitoring disk performance is common practice. I can pretty much guarentee it will be an issue at some point but its impossible to say where without grabbing some stats.
Reply With Quote
  #17  
Old 12-04-2006, 03:33 AM
Lucas Lucas is offline
Sage Icon
 
Join Date: Aug 2004
Location: Greece
Posts: 1,156
I 'll throw in my 2 cents worth of info from my experience.

In March 2005 I installed a 300Gb SATA drive for SageTV recordings. I sometimes recorded up to 3 concurrent streams at once.

By July 2006 the drive was almost full at around 270Gb and I noticed that when recording more than 1 show at a time, the recorded shows would have stutters and missing frames. The drive was heavily fragmented and it seemed that there was no large enough space to record both concurrent shows in close proximity on the physical disk area. As such the drive couldn't respond quickly enough and one or both shows being recorded would contain lost frames.

After experimenting with defragmentation tools and failing to achieve anything the only solution was to copy everything off the drive and copy them back to it. The ultimate defragmetation!

This is one of the reasons I don't use my RAID 5 array for recording. I only copy files that I want to keep long term, one at a time to the RAID 5 array to reduce its fragmentation.
__________________
Windows 10 64bit - Server: C2D, 6Gb RAM, 1xSamsung 840 Pro 128Gb, Seagate Archive HD 8TB - 2 x WD Green 1TB HDs for Recordings, PVR-USB2,Cinergy 2400i DVB-T, 2xTT DVB-S2 tuners, FireDTV S2
3 x HD300s
Reply With Quote
  #18  
Old 12-04-2006, 03:43 AM
doc's Avatar
doc doc is offline
Sage Fanatic
 
Join Date: Jun 2006
Location: Leicester, England
Posts: 918
I can see why people wonder about defragging, I just analysed one of my drives, bearing in mind its only 33% used (mostly continuous white space in the defrag window), and most movies are in 2 or 3 fragments, but then last nights recording of the butterfly effect, well, is somewhat different....

but it all plays perfectly well and I've never had a performance issue.

Last edited by doc; 01-02-2007 at 03:05 PM.
Reply With Quote
  #19  
Old 12-04-2006, 06:00 AM
jptaz's Avatar
jptaz jptaz is offline
Sage Fanatic
 
Join Date: May 2003
Location: Detroit Michigan
Posts: 991
I have been using Raxco perfect disk on my Raid 5 Array daily since I started recording 3 HD streams almost a year ago...initially I was having problems and thought that the issue was related to disk performance and fragmentation. I have never really reconsidered this until now....I am going to disable my defrags for a week or so and see how the performance is and if it is really worthwhile, but I think I may have gone down the wrong path and just started a daily defrag routine without a solid reason...time will tell.

John
__________________
SageTV 6.6, 100Mb LAN
Living Room: WinXP Pro SP2, AMD XP3200+, 1GB, 1.3TB 3ware 9500S12 RAID5, GigaByte GA7N400Pro2, 2xVBOX USB2 HD Tuner<-Antennna, 1xHDHR<-Antennna , HD100 to HDMI Splitter 1080i->32" 4:3 HDTV or 1080i->92" 1080P LCD Projector
Kitchen: WinXP Home SP2, Celeron 2.0Ghz, 512MB, 40GB, Saphire ATI MB, ATI9200->19"LCD
2 BedRooms: MediaMVP
Reply With Quote
  #20  
Old 12-04-2006, 07:14 AM
Mark SS Mark SS is offline
Sage Expert
 
Join Date: Dec 2005
Location: London, UK
Posts: 608
Quote:
Originally Posted by doc
I can see why people wonder about defragging, I just analysed one of my drives, bearing in mind its only 33% used (mostly continuous white space in the defrag window), and most movies are in 2 or 3 fragments, but then last nights recording of the butterfly effect, well, is somewhat different....
From that image it looks like only 1 recording is badly fragmented and with so much free space you'd be unlikely to see a problem for a long while. Every recording on my test drive is now 2-3000 fragments so its getting to the state where I should be able to induce an issue.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 07:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.