Re: tuning for large files in xfs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





Avi Kivity wrote:

This will overflow. I think that

     currentPos = drand48() * s.st_size;

will give better results

    currentPos=currentPos%s.st_size;


why would it overflow? Random() returns a 32 bit number, and if I multiple that by 32k (basically the number random() returns is the block number I am going to), that should never be over 64 bits? It may be over to size of the file though, but that is why I do mod s.st_size... and a random number mod something is still a random number. Also, with this method it is already currentSize aligned...


Sorry, I wasn't specific enough: please run iostat -x /dev/whatever 1 and look at the 'r/s' (reads per second) field. If that agrees with what your test says, you have a block layer or lower problem, otherwise it's a filesystem problem.


I ran it and found an r/s at 165, which basically corresponds to my 6 ms access time... when it should be around 3.5ms... so it seems like the seeks themselves are taking along time, NOT that I am doing extra seeks...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux