![]() If you use a "Hidden Truecrypt Volume", then the start of the inner volume is dependent on what files you have copied to the outer volume. Note: this only works with a "Standard Truecrypt Volume". This caused the first sector of the Truecrypt volume to be located at the magic sector 8192. So the solution was to move the partition back by 60 sectors, so the partition started at 8132 instead of 8192. Truecrypt started its volume at the end of this track (sector number 8252), which is 60 sectors too far. I have 63 sectors per track, so sector 8192 is the second sector of the 130th track. When I encrypted the partition with Truecrypt, I only got 8Mbyte/sec because it does not place the volume at sector 8192, but instead it places the volume at the end of the track which 8192 belongs to. This is the "magic number" - if the partition starts at 8191 or 8193, then it overlaps two blocks and the write speed goes down to around 8MByte/sec. The partition originally started at sector 8192. To work around this problem, I repartitioned my drive. Because there is no relation between the start of a track and the start of a block, the truecrypt partition usually starts part way into a block, which is why the write performance is bad. In the truecrypt user guide it says that the first sector "is stored in the last 512 bytes of the first logical drive track". The problem with Truecrypt is that is does not take the alignment into account. In other words, to write a single 32KB cluster, two 32KB blocks are written. If the start of the cluster is in the middle of a block and the end of the cluster is in the middle of the next block, then when the cluster is written to the flash, two blocks are written instead of one. The location of the each cluster must correspond to the start of a 'block', so that they are aligned. The FAT32 filesystem likewise write 'clusters' of 64 sectors (=32KB) at a time. My flash drive can not write individual bytes or sectors, it can only write 'blocks' of 64 sectors (=32KB) at a time. By moving the start of the partition by exactly 60 sectors, I increased the write speed to 13Mbyte/sec. Using Truecrypt to encrypt the partion, it went down to around 8Mbyte/sec.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |