DC++ FAQ » Using DC++ » Features

ID #1031

What is TTH (Tiger Tree Hashing)?

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:

  1. 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 thusly be chosen as an alternative source. Just because two files are the exact same size does not mean they are the same bitwise!
  2. Magnet Links. Implemented in DC++ 0.4032. More information in this FAQ.
  3. Segmented (aka multisource) downloading. While it is currently not officially implemented, now there is a safe way to implement downloading files from multiple sources. All clients at this point have been implementing segmented downloading in cowboy fashion. They do not verify the files are the same (except for the size and partial name) which can result in corrupt files. A file hash ensures the files are identical.

Tips to Speed up Hashing:
  1. Use an 80 pin IDE cable.
    Make sure your hard drive (HDD) has a 80 pin cable so it can use Ultra Direct Memory Access (UDMA) 66/100 speeds. A 40 pin IDE cables will restrict the HDD to a max speed of UDMA33. Any computer purchased in the last ~4 years should have an 80 pin cable. If your HDD uses a Serial ATA connection, your don't have to worry about the cable. Below is what a 80 pin IDE cable looks like.

    This is a comparison of a 80 pin cable vs a 40 pin cable.

  2. Enable UDMA 66/100 in Windows.

    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.

    Windows 2000/XP/2003: 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 place.

    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++!

    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. Another location an user rarely 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++.

  3. Upgrade Drivers

    Another source of speed problems is old IDE / chipset drivers. Go to the website of your motherboards 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 motherboards chipset. The main chipset makers are: Intel, Via, nVidia, SiS, and Ali. To find out what chipset and motherboard is inside your computer, you can use a free tool such as CPU-Z.

  4. Defragment

    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 it's almost a certainty they will 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, its recommended to 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, O&O Defrag, and Speed Disk.

  5. 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 takes 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 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 because you have a corrupt file system. Windows 9x/ME users need to run Checkdisk (Programs | Accessories | System Tools | Checkdisk). Windows 2000/XP 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.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)

Last update: 2006-06-12 21:26
Author: BSOD2600
Revision: 1.0

Print this record Print this record
Send to a friend Send to a friend
Show this as PDF file Show this as PDF file
Export as XML-File Export as XML-File

Please rate this entry:

Average rating: 3.56 from 5 (9 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry