On 22/07/2009 Jonas Meurer wrote: > i just did some benchmarking regarding the speed of luksOpen, as i have > the impression that it sometimes takes really long. > > [...] > > it is obvious that the time luksOpen takes is related to the keysize. > > but for some non-obvious reason it is neither proportional nor inverse > proportional related to size. > instead there seem to be keyfile sizes which cryptsetup is able to > process a lot faster than others. especially 128k seems to be a very > good size for key files. i now sorted the keyfiles in order of their size in the keyslots, and discovered that the time luksOpen takes seems to depend highly on the used keyslot, rather than on the keyfile size: (#1 is first run, #2 is second run) Slot #0: (128b): #1: 0:01.76 #2: 0:02.03 Slot #1: (512b): #1: 0:03.97 #2: 0:04.06 Slot #2: (1k): #1: 0:06.02 #2: 0:05.46 Slot #3: (16k): #1: 0:08.03 #2: 0:08.11 Slot #4: (64k): #1: 0:10.12 #2: 0:09.87 Slot #5: (128k): #1: 0:11.46 #2: 0:11.71 Slot #6: (512k): #1: 0:15.18 #2: 0:14.96 Slot #7: (1m): #1: 0:20.93 #2: 0:19.98 and original device (unordered keysize<->slot): Slot #0: (128k): #1: 0:02.11 #2: 0:01.96 Slot #1: (512k): #1: 0:05.14 #2: 0:05.15 Slot #2: (1k): #1: 0:06.03 #2: 0:05.68 Slot #3: (1m): #1: 0:12.86 #2: 0:13.09 Slot #4: (128b): #1: 0:10.06 #2: 0:10.07 Slot #5: (64k): #1: 0:11.72 #2: 0:11.38 Slot #6: (16k): #1: 0:14.09 #2: 0:14.10 Slot #7: (512b): #1: 0:15.75 #2: 0:16.14 my conclusion is that both increasing size of keysize and increasing slotnumber cause luksOpen to take longer: with unordered keysize<->slotrelations the time increases with increasing slotnumber, with the exception of slot #3 where the biggest key (1mb) is used. greetings, jonas
Attachment:
signature.asc
Description: Digital signature