Flexible I/O Tester development
 help / color / mirror / Atom feed
* Error running Fio SSD example
@ 2012-06-01 10:06 Georg Schönberger
  2012-06-08 12:47 ` Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Georg Schönberger @ 2012-06-01 10:06 UTC (permalink / raw)
  To: fio

Hello again,

I am having some troubles with running the fio example "ssd-test". I
changed the global section to decrease the size:
[global]
bs=4k
ioengine=libaio
iodepth=4
size=100M
direct=1
runtime=60
filename=ssd.test.file

If I am running Fio I get the following error:
----------------------------------------
fio.git/examples$ fio ssd-test
seq-read: (g=0): rw=read, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
rand-read: (g=1): rw=randread, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
seq-write: (g=2): rw=write, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
rand-write: (g=3): rw=randwrite, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
fio-2.0.8
Starting 4 processes
fio: pid=17997, err=22/file:filesetup.c:529, func=open(ssd.test.file),
error=Invalid argument
fio: pid=17998, err=22/file:filesetup.c:529, func=open(ssd.test.file),
error=Invalid argument
fio: pid=17999, err=22/file:filesetup.c:529, func=open(ssd.test.file),
error=Invalid argument
fio: pid=18000, err=22/file:filesetup.c:529, func=open(ssd.test.file),
error=Invalid argument


Run status group 0 (all jobs):

Run status group 1 (all jobs):

Run status group 2 (all jobs):

Run status group 3 (all jobs):
----------------------------------------
My test setup is:
-Fio
  fio.git$ fio --version
  fio-2.0.8
-libaio1
  0.3.109-2ubuntu1
-OS
  Distributor ID:    Ubuntu
  Description:    Ubuntu 12.04 LTS
  Release:    12.04
  Codename:    precise

-Georg

 

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

* Re: Error running Fio SSD example
  2012-06-01 10:06 Error running Fio SSD example Georg Schönberger
@ 2012-06-08 12:47 ` Jens Axboe
  2012-06-08 17:20   ` Georg Schönberger
  0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2012-06-08 12:47 UTC (permalink / raw)
  To: Georg Schönberger; +Cc: fio

On 06/01/2012 12:06 PM, Georg Schᅵnberger wrote:
> Hello again,
> 
> I am having some troubles with running the fio example "ssd-test". I
> changed the global section to decrease the size:
> [global]
> bs=4k
> ioengine=libaio
> iodepth=4
> size=100M
> direct=1
> runtime=60
> filename=ssd.test.file
> 
> If I am running Fio I get the following error:
> ----------------------------------------
> fio.git/examples$ fio ssd-test
> seq-read: (g=0): rw=read, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
> rand-read: (g=1): rw=randread, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
> seq-write: (g=2): rw=write, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
> rand-write: (g=3): rw=randwrite, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
> fio-2.0.8
> Starting 4 processes
> fio: pid=17997, err=22/file:filesetup.c:529, func=open(ssd.test.file),
> error=Invalid argument
> fio: pid=17998, err=22/file:filesetup.c:529, func=open(ssd.test.file),
> error=Invalid argument
> fio: pid=17999, err=22/file:filesetup.c:529, func=open(ssd.test.file),
> error=Invalid argument
> fio: pid=18000, err=22/file:filesetup.c:529, func=open(ssd.test.file),
> error=Invalid argument

Looks like the file system hosting the test file does not support
O_DIRECT.

-- 
Jens Axboe


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

* Re: Error running Fio SSD example
  2012-06-08 12:47 ` Jens Axboe
@ 2012-06-08 17:20   ` Georg Schönberger
  2012-06-08 18:44     ` Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Georg Schönberger @ 2012-06-08 17:20 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio@vger.kernel.org

Am 2012-06-08 14:47, schrieb Jens Axboe:
> On 06/01/2012 12:06 PM, Georg Schönberger wrote:
>> Hello again,
>>
>> I am having some troubles with running the fio example "ssd-test". I
>> changed the global section to decrease the size:
>> [global]
>> bs=4k
>> ioengine=libaio
>> iodepth=4
>> size=100M
>> direct=1
>> runtime=60
>> filename=ssd.test.file
>>
>> If I am running Fio I get the following error:
>> ----------------------------------------
>> fio.git/examples$ fio ssd-test
>> seq-read: (g=0): rw=read, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
>> rand-read: (g=1): rw=randread, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
>> seq-write: (g=2): rw=write, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
>> rand-write: (g=3): rw=randwrite, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
>> fio-2.0.8
>> Starting 4 processes
>> fio: pid=17997, err=22/file:filesetup.c:529, func=open(ssd.test.file),
>> error=Invalid argument
>> fio: pid=17998, err=22/file:filesetup.c:529, func=open(ssd.test.file),
>> error=Invalid argument
>> fio: pid=17999, err=22/file:filesetup.c:529, func=open(ssd.test.file),
>> error=Invalid argument
>> fio: pid=18000, err=22/file:filesetup.c:529, func=open(ssd.test.file),
>> error=Invalid argument
> Looks like the file system hosting the test file does not support
> O_DIRECT.
>
The file system is ext4.
Kernel Version 3.2.0-24-generic

-Georg


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

* Re: Error running Fio SSD example
  2012-06-08 17:20   ` Georg Schönberger
@ 2012-06-08 18:44     ` Jens Axboe
  2012-06-11  7:00       ` Georg Schönberger
                         ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jens Axboe @ 2012-06-08 18:44 UTC (permalink / raw)
  To: Georg Schönberger; +Cc: fio@vger.kernel.org

On 2012-06-08 19:20, Georg Schᅵnberger wrote:
> Am 2012-06-08 14:47, schrieb Jens Axboe:
>> On 06/01/2012 12:06 PM, Georg Schᅵnberger wrote:
>>> Hello again,
>>>
>>> I am having some troubles with running the fio example "ssd-test". I
>>> changed the global section to decrease the size:
>>> [global]
>>> bs=4k
>>> ioengine=libaio
>>> iodepth=4
>>> size=100M
>>> direct=1
>>> runtime=60
>>> filename=ssd.test.file
>>>
>>> If I am running Fio I get the following error:
>>> ----------------------------------------
>>> fio.git/examples$ fio ssd-test
>>> seq-read: (g=0): rw=read, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
>>> rand-read: (g=1): rw=randread, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
>>> seq-write: (g=2): rw=write, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
>>> rand-write: (g=3): rw=randwrite, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
>>> fio-2.0.8
>>> Starting 4 processes
>>> fio: pid=17997, err=22/file:filesetup.c:529, func=open(ssd.test.file),
>>> error=Invalid argument
>>> fio: pid=17998, err=22/file:filesetup.c:529, func=open(ssd.test.file),
>>> error=Invalid argument
>>> fio: pid=17999, err=22/file:filesetup.c:529, func=open(ssd.test.file),
>>> error=Invalid argument
>>> fio: pid=18000, err=22/file:filesetup.c:529, func=open(ssd.test.file),
>>> error=Invalid argument
>> Looks like the file system hosting the test file does not support
>> O_DIRECT.
>>
> The file system is ext4.
> Kernel Version 3.2.0-24-generic

And you aren't running the job file in some other location? ext4 would
definitely work. Please do:

# strace -o strace.out -f fio ssd-test

and send me strace.out (gzip'ed). Also include a pwd from where you are
running it, and output of the 'mount' command.

-- 
Jens Axboe


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

* Re: Error running Fio SSD example
  2012-06-08 18:44     ` Jens Axboe
@ 2012-06-11  7:00       ` Georg Schönberger
  2012-06-11  7:04       ` Georg Schönberger
  2012-06-11  7:24       ` Georg Schönberger
  2 siblings, 0 replies; 7+ messages in thread
From: Georg Schönberger @ 2012-06-11  7:00 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 2734 bytes --]

Am 2012-06-08 20:44, schrieb Jens Axboe:

On 2012-06-08 19:20, Georg Schönberger wrote:


Am 2012-06-08 14:47, schrieb Jens Axboe:


On 06/01/2012 12:06 PM, Georg Schönberger wrote:


Hello again,

I am having some troubles with running the fio example "ssd-test". I
changed the global section to decrease the size:
[global]
bs=4k
ioengine=libaio
iodepth=4
size=100M
direct=1
runtime=60
filename=ssd.test.file

If I am running Fio I get the following error:
----------------------------------------
fio.git/examples$ fio ssd-test
seq-read: (g=0): rw=read, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
rand-read: (g=1): rw=randread, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
seq-write: (g=2): rw=write, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
rand-write: (g=3): rw=randwrite, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
fio-2.0.8
Starting 4 processes
fio: pid=17997, err=22/file:filesetup.c:529, func=open(ssd.test.file),
error=Invalid argument
fio: pid=17998, err=22/file:filesetup.c:529, func=open(ssd.test.file),
error=Invalid argument
fio: pid=17999, err=22/file:filesetup.c:529, func=open(ssd.test.file),
error=Invalid argument
fio: pid=18000, err=22/file:filesetup.c:529, func=open(ssd.test.file),
error=Invalid argument


Looks like the file system hosting the test file does not support
O_DIRECT.



The file system is ext4.
Kernel Version 3.2.0-24-generic



And you aren't running the job file in some other location? ext4 would
definitely work. Please do:

# strace -o strace.out -f fio ssd-test

and send me strace.out (gzip'ed). Also include a pwd from where you are
running it, and output of the 'mount' command.



Here is the solution to my problem (answered from Jens Axboe):
ecryptfs does not support O_DIRECT IO. So that was the explanation for the problem.

Also a patch so that FIO gives some further information now:
Sure, I think it'd be a good idea if fio also complains that this is the likely explanation. Fio does this if the first IO errors, but it doesn't catch cases where O_DIRECT simply isn't supported. Can you try this patch, see if it complains as it should?

The patch has already been commited (also from Jens):

diff --git a/filesetup.c b/filesetup.c
index a1ad026..b1f73f7 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -526,6 +526,11 @@ open_again:

                snprintf(buf, sizeof(buf) - 1, "open(%s)", f->file_name);

+               if (__e == EINVAL && (flags & OS_O_DIRECT)) {
+                       log_err("fio: looks like your file system does not " \
+                               "support direct=1/buffered=0\n");
+               }
+
                td_verror(td, __e, buf);
        }




[-- Attachment #2: Type: text/html, Size: 3690 bytes --]

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

* Re: Error running Fio SSD example
  2012-06-08 18:44     ` Jens Axboe
  2012-06-11  7:00       ` Georg Schönberger
@ 2012-06-11  7:04       ` Georg Schönberger
  2012-06-11  7:24       ` Georg Schönberger
  2 siblings, 0 replies; 7+ messages in thread
From: Georg Schönberger @ 2012-06-11  7:04 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 2669 bytes --]

Am 2012-06-08 20:44, schrieb Jens Axboe:

On 2012-06-08 19:20, Georg Schönberger wrote:


Am 2012-06-08 14:47, schrieb Jens Axboe:


On 06/01/2012 12:06 PM, Georg Schönberger wrote:


Hello again,

I am having some troubles with running the fio example "ssd-test". I
changed the global section to decrease the size:
[global]
bs=4k
ioengine=libaio
iodepth=4
size=100M
direct=1
runtime=60
filename=ssd.test.file

If I am running Fio I get the following error:
----------------------------------------
fio.git/examples$ fio ssd-test
seq-read: (g=0): rw=read, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
rand-read: (g=1): rw=randread, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
seq-write: (g=2): rw=write, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
rand-write: (g=3): rw=randwrite, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
fio-2.0.8
Starting 4 processes
fio: pid=17997, err=22/file:filesetup.c:529, func=open(ssd.test.file),
error=Invalid argument
fio: pid=17998, err=22/file:filesetup.c:529, func=open(ssd.test.file),
error=Invalid argument
fio: pid=17999, err=22/file:filesetup.c:529, func=open(ssd.test.file),
error=Invalid argument
fio: pid=18000, err=22/file:filesetup.c:529, func=open(ssd.test.file),
error=Invalid argument


Looks like the file system hosting the test file does not support
O_DIRECT.



The file system is ext4.
Kernel Version 3.2.0-24-generic



And you aren't running the job file in some other location? ext4 would
definitely work. Please do:

# strace -o strace.out -f fio ssd-test

and send me strace.out (gzip'ed). Also include a pwd from where you are
running it, and output of the 'mount' command.



Here is the solution to my problem (answered from Jens Axboe):
ecryptfs does not support O_DIRECT IO. So that was the explanation for the problem.

Also a patch so that FIO gives some further information now:
Sure, I think it'd be a good idea if fio also complains that this is the likely explanation. Fio does this if the first IO errors, but it doesn't catch cases where O_DIRECT simply isn't supported. Can you try this patch, see if it complains as it should?

The patch has already been commited (also from Jens):
diff --git a/filesetup.c b/filesetup.c
index a1ad026..b1f73f7 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -526,6 +526,11 @@ open_again:

         snprintf(buf, sizeof(buf) - 1, "open(%s)", f->file_name);

+        if (__e == EINVAL && (flags & OS_O_DIRECT)) {
+            log_err("fio: looks like your file system does not " \
+                "support direct=1/buffered=0\n");
+        }
+
         td_verror(td, __e, buf);
     }

[-- Attachment #2: Type: text/html, Size: 3789 bytes --]

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

* Re: Error running Fio SSD example
  2012-06-08 18:44     ` Jens Axboe
  2012-06-11  7:00       ` Georg Schönberger
  2012-06-11  7:04       ` Georg Schönberger
@ 2012-06-11  7:24       ` Georg Schönberger
  2 siblings, 0 replies; 7+ messages in thread
From: Georg Schönberger @ 2012-06-11  7:24 UTC (permalink / raw)
  To: fio@vger.kernel.org

Am 2012-06-08 20:44, schrieb Jens Axboe:
> On 2012-06-08 19:20, Georg Schᅵnberger wrote:
>> Am 2012-06-08 14:47, schrieb Jens Axboe:
>>> On 06/01/2012 12:06 PM, Georg Schᅵnberger wrote:
>>>> Hello again,
>>>>
>>>> I am having some troubles with running the fio example "ssd-test". I
>>>> changed the global section to decrease the size:
>>>> [global]
>>>> bs=4k
>>>> ioengine=libaio
>>>> iodepth=4
>>>> size=100M
>>>> direct=1
>>>> runtime=60
>>>> filename=ssd.test.file
>>>>
>>>> If I am running Fio I get the following error:
>>>> ----------------------------------------
>>>> fio.git/examples$ fio ssd-test
>>>> seq-read: (g=0): rw=read, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
>>>> rand-read: (g=1): rw=randread, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
>>>> seq-write: (g=2): rw=write, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
>>>> rand-write: (g=3): rw=randwrite, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=4
>>>> fio-2.0.8
>>>> Starting 4 processes
>>>> fio: pid=17997, err=22/file:filesetup.c:529, func=open(ssd.test.file),
>>>> error=Invalid argument
>>>> fio: pid=17998, err=22/file:filesetup.c:529, func=open(ssd.test.file),
>>>> error=Invalid argument
>>>> fio: pid=17999, err=22/file:filesetup.c:529, func=open(ssd.test.file),
>>>> error=Invalid argument
>>>> fio: pid=18000, err=22/file:filesetup.c:529, func=open(ssd.test.file),
>>>> error=Invalid argument
>>> Looks like the file system hosting the test file does not support
>>> O_DIRECT.
>>>
>> The file system is ext4.
>> Kernel Version 3.2.0-24-generic
> And you aren't running the job file in some other location? ext4 would
> definitely work. Please do:
>
> # strace -o strace.out -f fio ssd-test
>
> and send me strace.out (gzip'ed). Also include a pwd from where you are
> running it, and output of the 'mount' command.
>
Here is the solution to my problem (answered from Jens Axboe):
/ecryptfs does not support O_DIRECT IO. So that was the explanation for
the problem./

Also a patch so that FIO gives some further information now:
/Sure, I think it'd be a good idea if fio also complains that this is
the likely explanation. Fio does this if the first IO errors, but it
doesn't catch cases where O_DIRECT simply isn't supported. Can you try
this patch, see if it complains as it should?/

The patch has already been tested and commited (also from Jens):
diff --git a/filesetup.c b/filesetup.c
index a1ad026..b1f73f7 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -526,6 +526,11 @@ open_again:
 
         snprintf(buf, sizeof(buf) - 1, "open(%s)", f->file_name);
 
+        if (__e == EINVAL && (flags & OS_O_DIRECT)) {
+            log_err("fio: looks like your file system does not " \
+                "support direct=1/buffered=0\n");
+        }
+
         td_verror(td, __e, buf);
     }

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

end of thread, other threads:[~2012-06-11  7:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-01 10:06 Error running Fio SSD example Georg Schönberger
2012-06-08 12:47 ` Jens Axboe
2012-06-08 17:20   ` Georg Schönberger
2012-06-08 18:44     ` Jens Axboe
2012-06-11  7:00       ` Georg Schönberger
2012-06-11  7:04       ` Georg Schönberger
2012-06-11  7:24       ` Georg Schönberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox