public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: fitzboy <fitzboy@iparadigms.com>
To: Avi Kivity <avi@argo.co.il>
Cc: linux-kernel@vger.kernel.org
Subject: Re: tuning for large files in xfs
Date: Tue, 23 May 2006 13:21:18 -0700	[thread overview]
Message-ID: <44736EBE.3030704@iparadigms.com> (raw)
In-Reply-To: <4472C25C.2090909@argo.co.il>



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...

  reply	other threads:[~2006-05-23 20:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-22 18:57 tuning for large files in xfs fitzboy
2006-05-22 19:15 ` Avi Kivity
2006-05-22 19:32   ` fitzboy
2006-05-22 19:36     ` Avi Kivity
2006-05-23  0:40       ` fitzboy
2006-05-23  8:05         ` Avi Kivity
2006-05-23 20:21           ` fitzboy [this message]
2006-05-24  8:12             ` Avi Kivity
2006-05-22 22:22 ` Miquel van Smoorenburg
2006-05-22 22:30 ` Matheus Izvekov
2006-05-23  0:42   ` fitzboy
2006-05-23  1:07     ` Matheus Izvekov
2006-05-22 22:51 ` Nathan Scott
2006-05-23  0:49   ` fitzboy
2006-05-23  1:59     ` Nathan Scott
2006-05-24  1:41       ` fitzboy
2006-05-24  2:23         ` Nathan Scott
2006-05-25 19:15           ` fitzboy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44736EBE.3030704@iparadigms.com \
    --to=fitzboy@iparadigms.com \
    --cc=avi@argo.co.il \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox