how-to block ads
Tiger Tree Hashing (TTH) is used to verify the integrity of large chunks of data. The data is split into small pieces which are individually hashed, then hashed together until one root hash is formed. A TTH looks something like:4NIABZVGR4HOTNRPOMH2IRIJQSJYKFHEEIQUJWY. Detailed information can be found here. DC++ 0.400 introduced mandatory TTH. Once DC++ hashes all of your share (yes, this will take a while), it will only hash new files. The hashing thread in DC++ is set to low priority, so it shouldn't interfere too badly.
There are several benefits of file hashing:
- No longer does one need to pay attention to the name of the file when looking for alternative sources. If the files are the same, they will have the same hash and can thus be chosen as an alternative source. Just because two files are the exact same size does not mean they are the same bitwise!
- Magnet Links. Implemented in DC++ 0.4032. More information in this FAQ.
- Segmented (aka multisource) downloading. Currently implemented in almost all maintained DC clients, it is now the default and safe way for downloading files from multiple sources. File corruption is checked on-the-fly after a chunk has been downloaded (using TTH leaves) so in case of corruption, only the corrupted parts will be redownloaded not the whole file.
Tips to Speed up Hashing:
- If you have Serial ATA (SATA) hard disk drive
Many SATA controllers offer selectable modes of operation: legacy Parallel ATA (IDE) emulation, standard AHCI mode, or vendor-specific RAID mode. Make sure your SATA controller is set to Advanced Host Controller Interface (AHCI) or RAID mode. It can be set in the system BIOS. These modes offer a faster and lot more flexible feature set for the controller to communicate with the disk device while using dramatically less resources. For Windows XP you need drivers from your motherboard/chipset manufacturer to be able to use the SATA controller in AHCI mode. In Vista/7 the operating system will recognize the controller but in most cases it'll find a 'Standard AHCI controller' only. To be able to push out the maximum from your SATA controller its highly recommended to install the latest drivers available from the motherboard or (preferably) the chipset manufacturer. Read more in the Upgrade drivers section below.
Intel SATA controller with proper drivers installed in the Device Manager
- If you have IDE hard disk drive
- Use an 80 pin IDE cable.
Make sure your hard drive (HDD) has an 80 pin cable so it can use Ultra Direct Memory Access (UDMA) 66/100 speeds. A 40 pin IDE cable will restrict the HDD to a max speed of UDMA33. Any computer purchased in the new millenium should have an 80 pin cable. If your HDD uses a Serial ATA connection, you don't have to worry about the cable. Below is what an 80 pin IDE cable looks like.
This is a comparison of an 80 pin cable vs a 40 pin cable.
- Enable UDMA 66/100 in Windows.
Windows 2000/XP/2003/Vista/7: Go to the Control Panels -> System -> Hardware Tab -> Device Manager. Get properties on each IDE channel and change the transfer mode to DMA if available. You will need to restart for the change to take effect.
After the computer has restarted, go back and check what the Current Transfer Mode is. Below is a table of theoretical speeds that correspond with the different drive speed settings. Windows will automatically set the mode to the highest possible.
|Ultra DMA Mode ||Maximum Transfer Rate (MB/s) ||Defining Standard || ||PIO Mode ||Maximum Transfer Rate (MB/s) ||Defining Standard |
|Multiword 1 ||13.3 ||ATA-2 || ||Mode 0 ||3.3 ||ATA |
|Multiword 2 ||16.7 ||ATA-2 || ||Mode 1 ||5.2 ||ATA |
|Mode 0 ||16.7 ||ATA1 / ATAPI-1 || ||Mode 2 ||8.3 ||ATA |
|Mode 1 ||25 ||ATA2 / ATAPI-2 || ||Mode 3 ||11.1 ||ATA-2 |
|Mode 2 ||33.3 ||ATA3 / ATAPI-3 || ||Mode 4 ||16.7 ||ATA-2 |
|Mode 3 ||44.4 ||ATA4 / ATAPI-4 || || || || |
|Mode 4 ||66.7 ||ATA5 / ATAPI-5 || || || || |
|Mode 5 ||100 ||ATA6 / ATAPI-6 || || || || |
|Mode 6 ||133 ||ATA7 / ATAPI-7 || || || || |
If your HDD is in a PIO mode, then the act of simply reading the HDD is CPU intensive and will severely hinder your hashing speeds in DC++!Windows 95/98/ME: From the Control Panel, open "System," then click the "Device Manager" tab. Open the icon for "Disk drives," and then highlight the drive you are interested in. Click "Properties," and then the "Settings" tab. Among the other settings you should find a "DMA" check box, which should be checked. If it is not, try checking it to enable DMA support. If you then reboot and the check box does not stay checked, this probably means your system does not support Ultra DMA and most likely is in PIO mode.
By now, most users should have their HDD(s) in an UDMA mode. If yours refuses to do so, then one must check the HDD controller in the BIOS of the motherboard; consult the manual on how to check that UDMA is enabled. Rarely, another location a user might need to check is the internal HDD settings. This can only be accessed by a special program obtained from the manufacturer of your HDD; consult their documentation on how to check this.
One can use a free program like HD Tach to benchmark the HDD(s) and compare it against dozens of others. If you have high CPU usage or a low average speed in your test result, you will experience slow hashing in DC++.
- If you have external hard disk drive
There are 3 common interfaces avaliable for external hard drives to connect to computers: USB, FireWare (IEEE 1394) and eSATA. While the USB interface is the most popular, its performance is the worst for large data throughput. If you're about to buy an external hard disk its wise to examine your computer before if it has external FireWire or eSATA connectors. Choosing these interfaces over USB (especially eSATA) you will experience dramatic speedup and responsiveness overall. External disks are usually slower than internal ones as they designed to work under more extreme circumstances than internal ones.
For external drives with eSATA connection you must follow the same advices written for internal SATA drives above. For FireWire connected ones you can't do any optimizaton - the device is connected through a standard interface which is automatically recognized and configured by any operating system made in the new millenium. For optimal usage of drives with USB connection you should have the USB drivers properly installed (they usually came with the chipset drivers, read below). Also you must make sure the drive is connected to an USB 2.0 port, not to a legacy one (newer computers don't have legacy ports anymore). Avoid using USB hubs connecting the drive, it may cause performance problems as well.
To avoid constant rehashing of your share in the external drive you must make sure that when connected, the drive always gets the same drive letter from Windows. To see how to set constant drive letter for a drive follow: »support.microsoft.com/default.as···&sd=tech
- Upgrade Drivers
Another source of speed problems is old IDE / SATA / chipset drivers. Go to the website of your motherboard's or chipset manufacturer and download the latest chipset and/or IDE drivers. If you have an OEM computer (Dell, Compaq, HP, Sony, Gateway, etc), then go to their website to look for the appropriate driver update. If you own a custom computer with a mainstream motherboard (Asus, Abit, MSI, Gigabyte, etc), then check their website for the appropriate driver update. If you own a custom computer, then you might be able to use the drivers directly from the manufacturer of the motherboard's chipset. The main chipset makers are: Intel, ATi/AMD, Via, nVidia, SiS and Ali/Uli. To find out what chipset and motherboard is inside your computer, you can use a free tool such as CPU-Z.
As advanced as hard drives have become, one item they are not very good at is housekeeping, or maybe that should be drive keeping. When files are created, deleted or modified, they will almost certainly become fragmented. Fragmented simply means the file is not stored in one place in its entirety, or what computer folks like to call a contiguous location. Different parts of the file are scattered across the hard disk in noncontiguous pieces. The more fragmented files there are on a drive, the more performance and reliability suffer as the drive heads have to search for all the pieces in different locations. The Disk Defragmenter Utility is designed to reorganize noncontiguous files into contiguous files and optimize their placement on the hard drive for increased reliability and performance.1
All versions of Windows came with some sort of disk defragmenter and can be accessed by going to: Start | All Programs | Accessories | System Tools | Disk Defragmenter. The defragmenter under Windows 95/98/ME is quite picky and often restarts itself if another program uses the system. For this reason, it's recommended that you use a third party tool. The defragmenter for Windows 2000/XP/2003 is not affected by this problem. Some popular third party tools are: Diskeeper, PerfectDisk and O&O Defrag.
- Disable CPU Intensive Programs
There are many programs that can eat up spare CPU time. This can result in DC++ taking longer to hash files in your share. If you use a screen saver, disable it; it may take a lot of CPU time away from DC++. If you use a distributed computing program (SETI, Protein folding, Key cracking, etc), disable it while DC++ is initially hashing your share. With DC++ closed, take a look at how much CPU time is being used (Win9x/ME users use Process Explorer, Win2K/XP/Vista/7 use Task Manager [Ctr+Alt+Del | Task Manager]). If the CPU usage is above 10%, find out which offending program(s) need to be closed.
Q: DC++ hangs when hashing
A: This is most likely caused by a corrupt file system. Windows 9x/ME users need to run Checkdisk (Programs | Accessories | System Tools | Checkdisk). Windows 2000/XP/Vista/7 need to run chkdsk (Start | Run | cmd /k chkdsk c: /f). You'll need to do this on each drive letter.
Q: Why is DC++ using 100% of my CPU?
A: DC++ is most likely hashing your files. Look in the bottom left corner of the DC++ window. You should see the files' names change as it finishes hashing each one. If it says File list refresh finished for an extended period of time and DC++ is still using 100% of the CPU, then it's likely that DC++ is crashing. Kill the application and restart it.
Q: Why is DC++ hashing my files?
A: Reread the top of this FAQ.
DC++ Change Log Related Entries:
0.760: Solve file list refresh & hashing sync issues (thanks ben); Stop hashing on shutdown (thanks steven sheehy); Hashing can be paused (bigmuscle, emtee, poy); Fix crash when hashing files on non-Windows systems (thanks razzloss)
0.709: Fixed TigerHash regression on big-endian architectures (steven sheehy)
0.708: Add fast hash option
0.698: Added fasthash for unix (thanks steven sheehy)
0.692: Tiger hash supports big endian and 64-bit architectures (thanks tobias nygren); Max hash speed fixed when fast hashing method is not used (thanks steven sheehy); Fixed a crash bug when hash data cannot be saved
0.68: Removed support for old hash index files (pre-0.670); Improved hashing error reporting; Fixed hash database rebuild
0.670: Redid some of the hash storage code -- should be slightly more efficient; Hash index format change; Improved efficiency for small files (<=64KiB) in the hash storage
0.666: Slight memory save for hash database; Fixed MyINFO spam when hashing
0.4034: Fixed a few issues with files not being hashed correctly (thanks, garg)
0.4033: Fixed a TTH hash speed bug (hashing should be much faster now); Added hash progress dialog -- hashing is run at a higher priority when dialog is shown
0.4032: DC++ will only share files that HAVE BEEN HASHED
0.402: Hash speed tweaks -- check if it's any better
0.400: Hashing is now mandatory
0.307: Added file hashing -- turn it off in advanced settings (experimental)
by USR56K edited by eMTee
last modified: 2012-11-06 12:58:34