lkml.org 
[lkml]   [2006]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: tuning for large files in xfs


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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-23 22:23    [W:0.077 / U:1.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site