All of lore.kernel.org
 help / color / mirror / Atom feed
* mkfs and mount tips?
@ 2007-02-13  9:19 Leon Kolchinsky
  0 siblings, 0 replies; 10+ messages in thread
From: Leon Kolchinsky @ 2007-02-13  9:19 UTC (permalink / raw)
  To: xfs

Hello All, 

I have Pentium II (Deschutes) with first 10GB (/dev/hda) and second
60GB(/dev/hdc) disk. 
After reading gentoo xfs threads on their forum and some SGI docs and FAQs I
came with this options for creating FS and mounting the disks: 

1) To create XFS on hda: 

Code:	
# mkfs.xfs -l internal,size=128m -d agcount=2 /dev/hda	


I've also seen "–d unwritten=0" option: 

So my question: 
Is it safe to add –d unwritten=0 option to increase performance like this
(or will I lose some essential functionality)?: 

Is this how the code should look?:	
# mkfs.xfs -l internal,size=128m -d agcount=2 –d unwritten=0 /dev/hda	


2) To prevent data lost in case of power outage(Disabling the write back
cache): 
Add the following to local.start: 

Code:	
# hdparm -W0 /dev/hda
# hdparm -W0 /dev/hdc
# blktool /dev/hda wcache off 
# blktool /dev/hdc wcache off	


Right? 

3) Mount options: 

On gentoo xfs thread it's suggested that the mount options should be
"noatime,logbufs=8" 

But what about "osyncisdsync" mount option. 

"• osyncisdsync
– Writes to files opened with the O_SYNC flag set will behave as if the
O_DSYNC flag had been used instead. 
– This can result in better performance without compromising data safety. 
– However timestamp updates from O_SYNC writes can be lost if the system
crashes. 
Use osyncisosync to disable this setting."

So do you think it is safe to add "osyncisdsync" mount option to fstab? 


I'd appreciate any comments/tips/answers.


Best Regards,
Leon Kolchinsky

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: mkfs and mount tips?
  2007-02-15  1:19 ` Timothy Shimmin
@ 2007-02-15 14:10   ` Leon Kolchinsky
  0 siblings, 0 replies; 10+ messages in thread
From: Leon Kolchinsky @ 2007-02-15 14:10 UTC (permalink / raw)
  To: 'Timothy Shimmin', linux-xfs



> -----Original Message-----
> From: Timothy Shimmin [mailto:tes@sgi.com]
> Sent: Thursday, February 15, 2007 3:19 AM
> To: Leon Kolchinsky; linux-xfs@oss.sgi.com
> Subject: Re: mkfs and mount tips?
> 
> Hi Leon,
> 
> --On 13 February 2007 10:48:15 AM +0200 Leon Kolchinsky
> <leonk@construct.haifa.ac.il> wrote:
> 
> > I've also seen "–d unwritten=0" option:
> >
> > So my question:
> > Is it safe to add –d unwritten=0 option to increase performance like
> this
> > (or will I lose some essential functionality)?:
> >
> 
> My understanding (although I'm not familiar with that code),
> is that unwritten extents are used in space preallocation.
> So unless you reserve space for a file it will not have an effect.
> And if you do, then setting "unwritten=0" will speed up writes because it
> doesn't
> need to flag the unwritten extents and write out the extra transactions
> for this.
> If the unwritten extents aren't flagged as such then there can be a
> security issue
> where one can read old data (other's data) for these unwritten parts.
> In fact, the security issue on preallocation (1997-98 sgi-pv#705217) was
> what motivated
> the idea of flagging extents as unwritten in the first place.
> 

Thanks for clearing that out :)

> --Tim

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: mkfs and mount tips?
  2007-02-13  8:48 Leon Kolchinsky
  2007-02-13  9:30 ` Justin Piszcz
@ 2007-02-15  1:19 ` Timothy Shimmin
  2007-02-15 14:10   ` Leon Kolchinsky
  1 sibling, 1 reply; 10+ messages in thread
From: Timothy Shimmin @ 2007-02-15  1:19 UTC (permalink / raw)
  To: Leon Kolchinsky, linux-xfs

Hi Leon,

--On 13 February 2007 10:48:15 AM +0200 Leon Kolchinsky <leonk@construct.haifa.ac.il> wrote:

> I've also seen "–d unwritten=0" option:
>
> So my question:
> Is it safe to add –d unwritten=0 option to increase performance like this
> (or will I lose some essential functionality)?:
>

My understanding (although I'm not familiar with that code),
is that unwritten extents are used in space preallocation.
So unless you reserve space for a file it will not have an effect.
And if you do, then setting "unwritten=0" will speed up writes because it doesn't
need to flag the unwritten extents and write out the extra transactions for this.
If the unwritten extents aren't flagged as such then there can be a security issue
where one can read old data (other's data) for these unwritten parts.
In fact, the security issue on preallocation (1997-98 sgi-pv#705217) was what motivated
the idea of flagging extents as unwritten in the first place.

--Tim

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: mkfs and mount tips?
  2007-02-13 10:33   ` Leon Kolchinsky
  2007-02-13 11:14     ` Olaf Frączyk
  2007-02-13 11:57     ` Andi Kleen
@ 2007-02-13 18:10     ` Eric Sandeen
  2 siblings, 0 replies; 10+ messages in thread
From: Eric Sandeen @ 2007-02-13 18:10 UTC (permalink / raw)
  To: Leon Kolchinsky; +Cc: 'Justin Piszcz', linux-xfs

Leon Kolchinsky wrote:

> What about "osyncisdsync" mount option, can someone recommend this based on
> its own experience?

[esandeen@neon linux-2.6.20]$ grep -r osyncisdsync fs/xfs/xfs_vfsops.c
                 } else if (!strcmp(this_char, "osyncisdsync")) {
         "XFS: osyncisdsync is now the default, option is deprecated.");
[esandeen@neon linux-2.6.20]$

-Eric

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: mkfs and mount tips?
  2007-02-13 11:14     ` Olaf Frączyk
@ 2007-02-13 12:38       ` Leon Kolchinsky
  0 siblings, 0 replies; 10+ messages in thread
From: Leon Kolchinsky @ 2007-02-13 12:38 UTC (permalink / raw)
  To: 'Olaf Fr?czyk'; +Cc: 'Justin Piszcz', linux-xfs

> (...)
> > > When I was trying out different optimizations (and what I currently
> use on
> > > a couple volumes is):
> > >
> > > logbufs=8,logbsize=262144,biosize=16,noatime,nodiratime,nobarrier
> > >
> >
> > I think that "nobarrier" option is bad, cause power failure would
> corrupt
> > your FS in this case.
> It depends on hardware. If you use SCSI with write cache turned off I
> see no reason to loss data. You might use RAID with write cache (battery
> powered) safely too.
> I'm not sure but even (S)ATA with write cache disabled should be fine.
> 

Thanks for the tips.

1) Is "–d unwritten=0" option is pretty safe?

2) What's the recommended value of "-d agcount=" for?:

10GB disk for web/mail/streaming server accordingly
50GB disk for web/mail/streaming server accordingly
300GB disk for web/mail/streaming server accordingly

Or how can I calculate these recommended values?

> Regards,
> 
> Olaf
> --
> Olaf Fr?czyk <olaf@cbk.poznan.pl>


Regards,
Leon Kolchinsky

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: mkfs and mount tips?
  2007-02-13 10:33   ` Leon Kolchinsky
  2007-02-13 11:14     ` Olaf Frączyk
@ 2007-02-13 11:57     ` Andi Kleen
  2007-02-13 18:10     ` Eric Sandeen
  2 siblings, 0 replies; 10+ messages in thread
From: Andi Kleen @ 2007-02-13 11:57 UTC (permalink / raw)
  To: Leon Kolchinsky; +Cc: 'Justin Piszcz', linux-xfs

"Leon Kolchinsky" <leonk@construct.haifa.ac.il> writes:
> 
> What about "osyncisdsync" mount option, can someone recommend this based on
> its own experience?

Not sync metadata on O_SYNC writes.

That's also dangerous -- might cause data corruption after crash. It is mostly
a hack if you know your programs very well, but can't change them
to use O_DSYNC when they only need that.

Also his other options basically all just use more memory. If you
have a P90 you're likely low on memory for modern standards and 
shouldn't use them.

-Andi

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: mkfs and mount tips?
  2007-02-13 10:33   ` Leon Kolchinsky
@ 2007-02-13 11:14     ` Olaf Frączyk
  2007-02-13 12:38       ` Leon Kolchinsky
  2007-02-13 11:57     ` Andi Kleen
  2007-02-13 18:10     ` Eric Sandeen
  2 siblings, 1 reply; 10+ messages in thread
From: Olaf Frączyk @ 2007-02-13 11:14 UTC (permalink / raw)
  To: Leon Kolchinsky; +Cc: 'Justin Piszcz', linux-xfs

On Tue, 2007-02-13 at 12:33 +0200, Leon Kolchinsky wrote:
> 
> > -----Original Message-----
> > From: Justin Piszcz [mailto:jpiszcz@lucidpixels.com]
> > Sent: Tuesday, February 13, 2007 11:30 AM
> > To: Leon Kolchinsky
> > Cc: linux-xfs@oss.sgi.com
> > Subject: Re: mkfs and mount tips?
(...)
> > When I was trying out different optimizations (and what I currently use on
> > a couple volumes is):
> > 
> > logbufs=8,logbsize=262144,biosize=16,noatime,nodiratime,nobarrier
> > 
> 
> I think that "nobarrier" option is bad, cause power failure would corrupt
> your FS in this case.
It depends on hardware. If you use SCSI with write cache turned off I
see no reason to loss data. You might use RAID with write cache (battery
powered) safely too.
I'm not sure but even (S)ATA with write cache disabled should be fine.

Regards,

Olaf
-- 
Olaf Frączyk <olaf@cbk.poznan.pl>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: mkfs and mount tips?
  2007-02-13  9:30 ` Justin Piszcz
@ 2007-02-13 10:33   ` Leon Kolchinsky
  2007-02-13 11:14     ` Olaf Frączyk
                       ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Leon Kolchinsky @ 2007-02-13 10:33 UTC (permalink / raw)
  To: 'Justin Piszcz'; +Cc: linux-xfs



> -----Original Message-----
> From: Justin Piszcz [mailto:jpiszcz@lucidpixels.com]
> Sent: Tuesday, February 13, 2007 11:30 AM
> To: Leon Kolchinsky
> Cc: linux-xfs@oss.sgi.com
> Subject: Re: mkfs and mount tips?
> 
> 
> 
> On Tue, 13 Feb 2007, Leon Kolchinsky wrote:
> 
> > Hello All,
> >
> > I have Pentium II (Deschutes) with first 10GB (/dev/hda) and second
> > 60GB(/dev/hdc) disk.
> > After reading gentoo xfs threads on their forum and some SGI docs and
> FAQs I
> > came with this options for creating FS and mounting the disks:
> >
> > 1) To create XFS on hda:
> >
> > Code:
> > # mkfs.xfs -l internal,size=128m -d agcount=2 /dev/hda
> >
> >
> > I've also seen "?d unwritten=0" option:
> >
> > So my question:
> > Is it safe to add ?d unwritten=0 option to increase performance like
> this
> > (or will I lose some essential functionality)?:
> >
> > Is this how the code should look?:
> > # mkfs.xfs -l internal,size=128m -d agcount=2 ?d unwritten=0 /dev/hda
> >
> >
> > 2) To prevent data lost in case of power outage(Disabling the write back
> > cache):
> > Add the following to local.start:
> >
> > Code:
> > # hdparm -W0 /dev/hda
> > # hdparm -W0 /dev/hdc
> > # blktool /dev/hda wcache off
> > # blktool /dev/hdc wcache off
> >
> >
> > Right?
> >
> > 3) Mount options:
> >
> > On gentoo xfs thread it's suggested that the mount options should be
> > "noatime,logbufs=8"
> >
> > But what about "osyncisdsync" mount option.
> >
> > "? osyncisdsync
> > ? Writes to files opened with the O_SYNC flag set will behave as if the
> > O_DSYNC flag
> > had been used instead.
> > ? This can result in better performance without compromising data
> safety.
> > ? However timestamp updates from O_SYNC writes can be lost if the system
> > crashes.
> > Use osyncisosync to disable this setting."
> >
> > So do you think it is safe to add "osyncisdsync" mount option to fstab?
> >
> >
> > I'd appreciate any comments/tips/answers.
> >
> >
> > Best Regards,
> > Leon Kolchinsky
> >
> >
> >
> >
> >
> 
> When I was trying out different optimizations (and what I currently use on
> a couple volumes is):
> 
> logbufs=8,logbsize=262144,biosize=16,noatime,nodiratime,nobarrier
> 

I think that "nobarrier" option is bad, cause power failure would corrupt
your FS in this case.
"nodiratime" is useless here, cause you're already using noatime which
includes nodiratime AFAIK.

What about "osyncisdsync" mount option, can someone recommend this based on
its own experience?

What are other optimization options during mkfs?

Regards,
Leon

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: mkfs and mount tips?
  2007-02-13  8:48 Leon Kolchinsky
@ 2007-02-13  9:30 ` Justin Piszcz
  2007-02-13 10:33   ` Leon Kolchinsky
  2007-02-15  1:19 ` Timothy Shimmin
  1 sibling, 1 reply; 10+ messages in thread
From: Justin Piszcz @ 2007-02-13  9:30 UTC (permalink / raw)
  To: Leon Kolchinsky; +Cc: linux-xfs



On Tue, 13 Feb 2007, Leon Kolchinsky wrote:

> Hello All,
>
> I have Pentium II (Deschutes) with first 10GB (/dev/hda) and second
> 60GB(/dev/hdc) disk.
> After reading gentoo xfs threads on their forum and some SGI docs and FAQs I
> came with this options for creating FS and mounting the disks:
>
> 1) To create XFS on hda:
>
> Code:
> # mkfs.xfs -l internal,size=128m -d agcount=2 /dev/hda
>
>
> I've also seen "?d unwritten=0" option:
>
> So my question:
> Is it safe to add ?d unwritten=0 option to increase performance like this
> (or will I lose some essential functionality)?:
>
> Is this how the code should look?:
> # mkfs.xfs -l internal,size=128m -d agcount=2 ?d unwritten=0 /dev/hda
>
>
> 2) To prevent data lost in case of power outage(Disabling the write back
> cache):
> Add the following to local.start:
>
> Code:
> # hdparm -W0 /dev/hda
> # hdparm -W0 /dev/hdc
> # blktool /dev/hda wcache off
> # blktool /dev/hdc wcache off
>
>
> Right?
>
> 3) Mount options:
>
> On gentoo xfs thread it's suggested that the mount options should be
> "noatime,logbufs=8"
>
> But what about "osyncisdsync" mount option.
>
> "? osyncisdsync
> ? Writes to files opened with the O_SYNC flag set will behave as if the
> O_DSYNC flag
> had been used instead.
> ? This can result in better performance without compromising data safety.
> ? However timestamp updates from O_SYNC writes can be lost if the system
> crashes.
> Use osyncisosync to disable this setting."
>
> So do you think it is safe to add "osyncisdsync" mount option to fstab?
>
>
> I'd appreciate any comments/tips/answers.
>
>
> Best Regards,
> Leon Kolchinsky
>
>
>
>
>

When I was trying out different optimizations (and what I currently use on 
a couple volumes is):

logbufs=8,logbsize=262144,biosize=16,noatime,nodiratime,nobarrier

Justin.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* mkfs and mount tips?
@ 2007-02-13  8:48 Leon Kolchinsky
  2007-02-13  9:30 ` Justin Piszcz
  2007-02-15  1:19 ` Timothy Shimmin
  0 siblings, 2 replies; 10+ messages in thread
From: Leon Kolchinsky @ 2007-02-13  8:48 UTC (permalink / raw)
  To: linux-xfs

Hello All, 

I have Pentium II (Deschutes) with first 10GB (/dev/hda) and second
60GB(/dev/hdc) disk. 
After reading gentoo xfs threads on their forum and some SGI docs and FAQs I
came with this options for creating FS and mounting the disks: 

1) To create XFS on hda: 

Code:	
# mkfs.xfs -l internal,size=128m -d agcount=2 /dev/hda	


I've also seen "–d unwritten=0" option: 

So my question: 
Is it safe to add –d unwritten=0 option to increase performance like this
(or will I lose some essential functionality)?: 

Is this how the code should look?:	
# mkfs.xfs -l internal,size=128m -d agcount=2 –d unwritten=0 /dev/hda	


2) To prevent data lost in case of power outage(Disabling the write back
cache): 
Add the following to local.start: 

Code:	
# hdparm -W0 /dev/hda 
# hdparm -W0 /dev/hdc 
# blktool /dev/hda wcache off 
# blktool /dev/hdc wcache off	


Right? 

3) Mount options: 

On gentoo xfs thread it's suggested that the mount options should be
"noatime,logbufs=8" 

But what about "osyncisdsync" mount option. 

"• osyncisdsync 
– Writes to files opened with the O_SYNC flag set will behave as if the
O_DSYNC flag 
had been used instead. 
– This can result in better performance without compromising data safety. 
– However timestamp updates from O_SYNC writes can be lost if the system
crashes. 
Use osyncisosync to disable this setting."

So do you think it is safe to add "osyncisdsync" mount option to fstab? 


I'd appreciate any comments/tips/answers.


Best Regards,
Leon Kolchinsky

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-02-15 14:08 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-13  9:19 mkfs and mount tips? Leon Kolchinsky
  -- strict thread matches above, loose matches on Subject: below --
2007-02-13  8:48 Leon Kolchinsky
2007-02-13  9:30 ` Justin Piszcz
2007-02-13 10:33   ` Leon Kolchinsky
2007-02-13 11:14     ` Olaf Frączyk
2007-02-13 12:38       ` Leon Kolchinsky
2007-02-13 11:57     ` Andi Kleen
2007-02-13 18:10     ` Eric Sandeen
2007-02-15  1:19 ` Timothy Shimmin
2007-02-15 14:10   ` Leon Kolchinsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.