Re: long writes

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

 



On Tuesday 18 Jan 2005 19:39, Brian Stark wrote:
> -----Original Message-----
> From: fedora-list-bounces@xxxxxxxxxx
> [mailto:fedora-list-bounces@xxxxxxxxxx]On Behalf Of Matthew Miller
> Sent: Tuesday, January 18, 2005 9:52 AM
> To: For users of Fedora Core releases
> Subject: Re: long writes
>
> On Tue, Jan 18, 2005 at 09:44:09AM -0800, Brian Stark wrote:
> > I'm not sure if this is the proper forum, but it seems like a good place
> > to start. I am maintaining a linux cluster of servers (to date around
> > 350). They have a partition configured as a RAID, the average performance
> > on these servers is very good , but occasionally I will see a server go
> > away for 30-40 seconds. After researching it in the code I found that the
> > culprit was a "write" function call. When the call eventually completes,
> > but I am writing under 100K of data so I have no idea why it would take
> > that long to complete. Has anyone else seen this type of behavior? If not
>
> Which IO scheduler are you using?
>
>
> --
> Matthew Miller           mattdm@xxxxxxxxxx        <http://www.mattdm.org/>
> Boston University Linux      ------>                <http://linux.bu.edu/>
>
> Thanks for the reply, We are configured to use the deadline IO scheduling
> algorithm, we made this decision after finding a similar issue on the read
> side.  Even with deadline our worst case on the write seems to be much
> worse then the read side, an outrageous 30-40 seconds.  Our servers may be
> under a significant load both in memory usage and CPU, what I am mostly
> interested in is an explanation.  If its something we have to live with we
> will work around it, but if we are doing something stupid I would rather
> fix it.  below is the code snippet we use to open the file:
>
>  oflags = O_NDELAY;
>  oflags |= O_WRONLY;  /* only writing is permitted */
>  oflags |= O_CREAT;  /* create the file if it doesn't exist */
>  oflags |= O_TRUNC;  /* truncate the file if it does exist */
>  oflags |= O_NONBLOCK;   /* do not block on reads and writes this will
>           provide us with asynchronous behavior*/
>  fd = open(fn, oflags, 0666);
>
> The only thing that strikes me are the O_NDELAY and O_NONBLOCK flags.  I
> understand (now) that writes to disk will block despite these flags, but
> will their usage also cause any odd behavior, or am I grasping at straws.
>
> Brian
Do you allocate the write buffer yourself?
-- 
Tony Dietrich
-------------
War isn't a good life, but it's life.
  -- Kirk, "A Private Little War", stardate 4211.8


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux