1 (edited by steveh 2009-11-02 16:18:48)

Topic: Blocksize enhancement

It would be useful to be able to specify the blocksize to be used and avoid the testing for ideal blocksize that takes place.

Also, is it worth checking for the best blocksize if the size of the partition to be copied is less than the number of blocks in all the blocksize tests?

Trying to save the write cycles on my SD cards!

(Edited to say that this relates to the GUI interface on the live CD)

2

Re: Blocksize enhancement

The testing for ideal block size does real work while the testing for optimum block size is underway.  It would be the same number of reads and writes if the the block size was specified.

In other words, if you copied a partition small partition (say 16 MB) then the copy operation would complete before the optimum block size was discovered.

3

Re: Blocksize enhancement

gedakc wrote:

The testing for ideal block size does real work while the testing for optimum block size is underway.  It would be the same number of reads and writes if the the block size was specified.

In other words, if you copied a partition small partition (say 16 MB) then the copy operation would complete before the optimum block size was discovered.

I'm not 100% certain that's the case, I copied a smallish partition earlier (less than 100MB) but it copied 32MB each time it did its check before settling on 64k as a blocksize then copying it all?

It shouldn't have got beyond the 4096 check?

4

Re: Blocksize enhancement

Before performing a copy, or a move of a partition, GParted will read the entire partition once to check for bad sectors.  Assuming no bad sectors are found it will then perform another pass reading and writing.

Hence in the case of copying a 16 MB partition, 32 MB will be read and 16 MB will be written.

At least that is what I recall.  I haven't looked at the code recently.

5

Re: Blocksize enhancement

I think in this case it did the read checks, but then did 7*32MB to determine the blocksize, then did the reads.

I'll check tomorrow and record exactly what happens.

6

Re: Blocksize enhancement

Following is an excerpt from the gparted_details.htm log file for copying a 16 MB partition:

copy file system of /dev/sdd2 to /dev/sdd3  00:00:02    ( SUCCESS )
         
   using internal algorithm
   copy 32130 sectors
   finding optimal blocksize
         
      optimal blocksize is 64 sectors (32.00 KB)
   copy 32130 sectors using a blocksize of 64 sectors  00:00:02    ( SUCCESS )
         
              32130 of 32130 copied
   32130 sectors copied 

A sector in this case is 512 Bytes.
So 32130 sectors X 512 Bytes per sector =~ 16 MB.