Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-24 Thread Stefan Priebe
Hi Ric, Am 23.11.2013 20:35, schrieb Ric Wheeler: On 11/23/2013 01:27 PM, Stefan Priebe wrote: Hi Ric, Am 22.11.2013 21:37, schrieb Ric Wheeler: On 11/22/2013 03:01 PM, Stefan Priebe wrote: Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-24 Thread Stefan Priebe
Hi Ric, Am 23.11.2013 20:35, schrieb Ric Wheeler: On 11/23/2013 01:27 PM, Stefan Priebe wrote: Hi Ric, Am 22.11.2013 21:37, schrieb Ric Wheeler: On 11/22/2013 03:01 PM, Stefan Priebe wrote: Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Ric Wheeler
On 11/23/2013 07:22 PM, Pavel Machek wrote: On Sat 2013-11-23 18:01:32, Ric Wheeler wrote: On 11/23/2013 03:36 PM, Pavel Machek wrote: On Wed 2013-11-20 08:02:33, Howard Chu wrote: Theodore Ts'o wrote: Historically, Intel has been really good about avoiding this, but since they've moved to

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread One Thousand Gnomes
> Yes, and I'm arguing that is a bug (as in, < 0.01% people are using > hdparm correctly). Generally speaking if you are using hdparm for tuning it means we need to fix something in the ATA layer so you don't have to ! > I guess it would be safer not to reattach drives after power > fail...

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Pavel Machek
On Sat 2013-11-23 18:01:32, Ric Wheeler wrote: > On 11/23/2013 03:36 PM, Pavel Machek wrote: > >On Wed 2013-11-20 08:02:33, Howard Chu wrote: > >>Theodore Ts'o wrote: > >>>Historically, Intel has been really good about avoiding this, but > >>>since they've moved to using 3rd party flash

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread One Thousand Gnomes
> > And the 520 doesn't claim this feature (look for "enhanced power loss > > protection" at http://ark.intel.com/products/66248), so that wouldn't > > explain these results anyway. > > Correct i think intel simply ignores CMD_FLUSH on that drive - no idea > why an they fixed this for their 330,

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Ric Wheeler
On 11/23/2013 03:36 PM, Pavel Machek wrote: On Wed 2013-11-20 08:02:33, Howard Chu wrote: Theodore Ts'o wrote: Historically, Intel has been really good about avoiding this, but since they've moved to using 3rd party flash controllers, I now advise everyone who plans to use any flash storage,

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Pavel Machek
On Wed 2013-11-20 08:02:33, Howard Chu wrote: > Theodore Ts'o wrote: > >Historically, Intel has been really good about avoiding this, but > >since they've moved to using 3rd party flash controllers, I now advise > >everyone who plans to use any flash storage, regardless of the > >manufacturer, to

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Stefan Priebe
Hi Ric, Am 23.11.2013 20:35, schrieb Ric Wheeler: On 11/23/2013 01:27 PM, Stefan Priebe wrote: Hi Ric, Am 22.11.2013 21:37, schrieb Ric Wheeler: On 11/22/2013 03:01 PM, Stefan Priebe wrote: Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Ric Wheeler
On 11/23/2013 01:27 PM, Stefan Priebe wrote: Hi Ric, Am 22.11.2013 21:37, schrieb Ric Wheeler: On 11/22/2013 03:01 PM, Stefan Priebe wrote: Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement CMD_FLUSH to return immediately i.e. no guarantee the data

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Stefan Priebe
Hi Ric, Am 22.11.2013 21:37, schrieb Ric Wheeler: On 11/22/2013 03:01 PM, Stefan Priebe wrote: Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement CMD_FLUSH to return immediately i.e. no guarantee the data is actually on disk. In which case they

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Stefan Priebe
Hi Ric, Am 22.11.2013 21:37, schrieb Ric Wheeler: On 11/22/2013 03:01 PM, Stefan Priebe wrote: Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement CMD_FLUSH to return immediately i.e. no guarantee the data is actually on disk. In which case they

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Ric Wheeler
On 11/23/2013 01:27 PM, Stefan Priebe wrote: Hi Ric, Am 22.11.2013 21:37, schrieb Ric Wheeler: On 11/22/2013 03:01 PM, Stefan Priebe wrote: Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement CMD_FLUSH to return immediately i.e. no guarantee the data

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Stefan Priebe
Hi Ric, Am 23.11.2013 20:35, schrieb Ric Wheeler: On 11/23/2013 01:27 PM, Stefan Priebe wrote: Hi Ric, Am 22.11.2013 21:37, schrieb Ric Wheeler: On 11/22/2013 03:01 PM, Stefan Priebe wrote: Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Pavel Machek
On Wed 2013-11-20 08:02:33, Howard Chu wrote: Theodore Ts'o wrote: Historically, Intel has been really good about avoiding this, but since they've moved to using 3rd party flash controllers, I now advise everyone who plans to use any flash storage, regardless of the manufacturer, to do their

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Ric Wheeler
On 11/23/2013 03:36 PM, Pavel Machek wrote: On Wed 2013-11-20 08:02:33, Howard Chu wrote: Theodore Ts'o wrote: Historically, Intel has been really good about avoiding this, but since they've moved to using 3rd party flash controllers, I now advise everyone who plans to use any flash storage,

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread One Thousand Gnomes
And the 520 doesn't claim this feature (look for enhanced power loss protection at http://ark.intel.com/products/66248), so that wouldn't explain these results anyway. Correct i think intel simply ignores CMD_FLUSH on that drive - no idea why an they fixed this for their 330, 530, DC

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Pavel Machek
On Sat 2013-11-23 18:01:32, Ric Wheeler wrote: On 11/23/2013 03:36 PM, Pavel Machek wrote: On Wed 2013-11-20 08:02:33, Howard Chu wrote: Theodore Ts'o wrote: Historically, Intel has been really good about avoiding this, but since they've moved to using 3rd party flash controllers, I now

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread One Thousand Gnomes
Yes, and I'm arguing that is a bug (as in, 0.01% people are using hdparm correctly). Generally speaking if you are using hdparm for tuning it means we need to fix something in the ATA layer so you don't have to ! I guess it would be safer not to reattach drives after power fail... (also I

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-23 Thread Ric Wheeler
On 11/23/2013 07:22 PM, Pavel Machek wrote: On Sat 2013-11-23 18:01:32, Ric Wheeler wrote: On 11/23/2013 03:36 PM, Pavel Machek wrote: On Wed 2013-11-20 08:02:33, Howard Chu wrote: Theodore Ts'o wrote: Historically, Intel has been really good about avoiding this, but since they've moved to

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-22 Thread Stefan Priebe
Hi Ric, Am 22.11.2013 21:37, schrieb Ric Wheeler: On 11/22/2013 03:01 PM, Stefan Priebe wrote: Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement CMD_FLUSH to return immediately i.e. no guarantee the data is actually on disk. In which case they

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-22 Thread Ric Wheeler
On 11/22/2013 03:01 PM, Stefan Priebe wrote: Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement CMD_FLUSH to return immediately i.e. no guarantee the data is actually on disk. In which case they aren't spec complicant. While I've seen countless data

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-22 Thread Stefan Priebe
Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement CMD_FLUSH to return immediately i.e. no guarantee the data is actually on disk. In which case they aren't spec complicant. While I've seen countless data integrity bugs on lower end ATA SSDs I've not

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-22 Thread Stefan Priebe
Am 20.11.2013 16:55, schrieb J. Bruce Fields: On Wed, Nov 20, 2013 at 10:37:03AM -0500, Theodore Ts'o wrote: On Wed, Nov 20, 2013 at 08:52:36PM +0530, Chinmay V S wrote: If you have confirmed the performance numbers, then it indicates that the Intel 530 controller is more advanced and makes

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-22 Thread Stefan Priebe
Am 20.11.2013 16:22, schrieb Chinmay V S: Hi Stefan, thanks for your great and detailed reply. I'm just wondering why an intel 520 ssd degrades the speed just by 2% in case of O_SYNC. intel 530 the newer model and replacement for the 520 degrades speed by 75% like the crucial m4. The Intel DC

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-22 Thread Stefan Priebe
Am 20.11.2013 16:22, schrieb Chinmay V S: Hi Stefan, thanks for your great and detailed reply. I'm just wondering why an intel 520 ssd degrades the speed just by 2% in case of O_SYNC. intel 530 the newer model and replacement for the 520 degrades speed by 75% like the crucial m4. The Intel DC

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-22 Thread Stefan Priebe
Am 20.11.2013 16:55, schrieb J. Bruce Fields: On Wed, Nov 20, 2013 at 10:37:03AM -0500, Theodore Ts'o wrote: On Wed, Nov 20, 2013 at 08:52:36PM +0530, Chinmay V S wrote: If you have confirmed the performance numbers, then it indicates that the Intel 530 controller is more advanced and makes

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-22 Thread Stefan Priebe
Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement CMD_FLUSH to return immediately i.e. no guarantee the data is actually on disk. In which case they aren't spec complicant. While I've seen countless data integrity bugs on lower end ATA SSDs I've not

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-22 Thread Ric Wheeler
On 11/22/2013 03:01 PM, Stefan Priebe wrote: Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement CMD_FLUSH to return immediately i.e. no guarantee the data is actually on disk. In which case they aren't spec complicant. While I've seen countless data

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-22 Thread Stefan Priebe
Hi Ric, Am 22.11.2013 21:37, schrieb Ric Wheeler: On 11/22/2013 03:01 PM, Stefan Priebe wrote: Hi Christoph, Am 21.11.2013 11:11, schrieb Christoph Hellwig: 2. Some drives may implement CMD_FLUSH to return immediately i.e. no guarantee the data is actually on disk. In which case they

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Chinmay V S
On Wed, Nov 20, 2013 at 11:28 PM, J. Bruce Fields wrote: > On Wed, Nov 20, 2013 at 10:41:54PM +0530, Chinmay V S wrote: >> On Wed, Nov 20, 2013 at 9:25 PM, J. Bruce Fields >> wrote: >> > Some SSD's are also claim the ability to flush the cache on power loss: >> > >> > >> >

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread J. Bruce Fields
On Wed, Nov 20, 2013 at 10:41:54PM +0530, Chinmay V S wrote: > On Wed, Nov 20, 2013 at 9:25 PM, J. Bruce Fields wrote: > > Some SSD's are also claim the ability to flush the cache on power loss: > > > > > >

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Chinmay V S
On Wed, Nov 20, 2013 at 9:25 PM, J. Bruce Fields wrote: > Some SSD's are also claim the ability to flush the cache on power loss: > > > http://www.intel.com/content/www/us/en/solid-state-drives/ssd-320-series-power-loss-data-protection-brief.html > > Which should in theory let them

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Howard Chu
Theodore Ts'o wrote: Historically, Intel has been really good about avoiding this, but since they've moved to using 3rd party flash controllers, I now advise everyone who plans to use any flash storage, regardless of the manufacturer, to do their own explicit power fail testing (hitting the

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread J. Bruce Fields
On Wed, Nov 20, 2013 at 10:37:03AM -0500, Theodore Ts'o wrote: > On Wed, Nov 20, 2013 at 08:52:36PM +0530, Chinmay V S wrote: > > > > If you have confirmed the performance numbers, then it indicates that > > the Intel 530 controller is more advanced and makes better use of the > > internal

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Theodore Ts'o
On Wed, Nov 20, 2013 at 08:52:36PM +0530, Chinmay V S wrote: > > If you have confirmed the performance numbers, then it indicates that > the Intel 530 controller is more advanced and makes better use of the > internal disk-cache to achieve better performance (as compared to the > Intel 520). Thus

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Chinmay V S
Hi Stefan, > thanks for your great and detailed reply. I'm just wondering why an > intel 520 ssd degrades the speed just by 2% in case of O_SYNC. intel 530 > the newer model and replacement for the 520 degrades speed by 75% like > the crucial m4. > > The Intel DC S3500 instead delivers also

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Stefan Priebe - Profihost AG
Hi ChinmayVS, Am 20.11.2013 14:34, schrieb Chinmay V S: > Hi Stefan, > > Christoph is bang on right. To further elaborate upon this, here is > what is happening in the above case : > By using DIRECT, SYNC/DSYNC flags on a block device (i.e. bypassing > the file-systems layer), essentially you

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Christoph Hellwig
On Wed, Nov 20, 2013 at 07:04:15PM +0530, Chinmay V S wrote: > Note that SYNC/DSYNC on a filesystem(eg. ext2/3/4) does NOT issue a > CMD_FLUSH. The "SYNC" via filesystem, simply guarantees that the data > is sent to the disk and not really flushed to the disk. While this used to be the case for

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Chinmay V S
Hi Stefan, Christoph is bang on right. To further elaborate upon this, here is what is happening in the above case : By using DIRECT, SYNC/DSYNC flags on a block device (i.e. bypassing the file-systems layer), essentially you are enforcing a CMD_FLUSH on each I/O command sent to the disk. This is

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Christoph Hellwig
On Wed, Nov 20, 2013 at 01:12:43PM +0100, Stefan Priebe - Profihost AG wrote: > Can anyone explain to me why O_DSYNC for my app on linux is so slow? Because FreeBSD ignores O_DSYNC on block devices, it never sends a FLUSH to the device. -- To unsubscribe from this list: send the line

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Christoph Hellwig
On Wed, Nov 20, 2013 at 01:12:43PM +0100, Stefan Priebe - Profihost AG wrote: Can anyone explain to me why O_DSYNC for my app on linux is so slow? Because FreeBSD ignores O_DSYNC on block devices, it never sends a FLUSH to the device. -- To unsubscribe from this list: send the line unsubscribe

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Chinmay V S
Hi Stefan, Christoph is bang on right. To further elaborate upon this, here is what is happening in the above case : By using DIRECT, SYNC/DSYNC flags on a block device (i.e. bypassing the file-systems layer), essentially you are enforcing a CMD_FLUSH on each I/O command sent to the disk. This is

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Christoph Hellwig
On Wed, Nov 20, 2013 at 07:04:15PM +0530, Chinmay V S wrote: Note that SYNC/DSYNC on a filesystem(eg. ext2/3/4) does NOT issue a CMD_FLUSH. The SYNC via filesystem, simply guarantees that the data is sent to the disk and not really flushed to the disk. While this used to be the case for ext2

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Stefan Priebe - Profihost AG
Hi ChinmayVS, Am 20.11.2013 14:34, schrieb Chinmay V S: Hi Stefan, Christoph is bang on right. To further elaborate upon this, here is what is happening in the above case : By using DIRECT, SYNC/DSYNC flags on a block device (i.e. bypassing the file-systems layer), essentially you are

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Chinmay V S
Hi Stefan, thanks for your great and detailed reply. I'm just wondering why an intel 520 ssd degrades the speed just by 2% in case of O_SYNC. intel 530 the newer model and replacement for the 520 degrades speed by 75% like the crucial m4. The Intel DC S3500 instead delivers also nearly 98%

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Theodore Ts'o
On Wed, Nov 20, 2013 at 08:52:36PM +0530, Chinmay V S wrote: If you have confirmed the performance numbers, then it indicates that the Intel 530 controller is more advanced and makes better use of the internal disk-cache to achieve better performance (as compared to the Intel 520). Thus

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread J. Bruce Fields
On Wed, Nov 20, 2013 at 10:37:03AM -0500, Theodore Ts'o wrote: On Wed, Nov 20, 2013 at 08:52:36PM +0530, Chinmay V S wrote: If you have confirmed the performance numbers, then it indicates that the Intel 530 controller is more advanced and makes better use of the internal disk-cache to

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Howard Chu
Theodore Ts'o wrote: Historically, Intel has been really good about avoiding this, but since they've moved to using 3rd party flash controllers, I now advise everyone who plans to use any flash storage, regardless of the manufacturer, to do their own explicit power fail testing (hitting the

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Chinmay V S
On Wed, Nov 20, 2013 at 9:25 PM, J. Bruce Fields bfie...@fieldses.org wrote: Some SSD's are also claim the ability to flush the cache on power loss: http://www.intel.com/content/www/us/en/solid-state-drives/ssd-320-series-power-loss-data-protection-brief.html Which should in theory

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread J. Bruce Fields
On Wed, Nov 20, 2013 at 10:41:54PM +0530, Chinmay V S wrote: On Wed, Nov 20, 2013 at 9:25 PM, J. Bruce Fields bfie...@fieldses.org wrote: Some SSD's are also claim the ability to flush the cache on power loss:

Re: Why is O_DSYNC on linux so slow / what's wrong with my SSD?

2013-11-20 Thread Chinmay V S
On Wed, Nov 20, 2013 at 11:28 PM, J. Bruce Fields bfie...@fieldses.org wrote: On Wed, Nov 20, 2013 at 10:41:54PM +0530, Chinmay V S wrote: On Wed, Nov 20, 2013 at 9:25 PM, J. Bruce Fields bfie...@fieldses.org wrote: Some SSD's are also claim the ability to flush the cache on power loss: