Flexible I/O Tester development
 help / color / mirror / Atom feed
* fio 2.0.9 fails: shmget: No space left on device
@ 2012-09-21 11:51 Konstantin Boyandin
  2012-09-21 12:15 ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Konstantin Boyandin @ 2012-09-21 11:51 UTC (permalink / raw)
  To: fio

Hello,

When trying to run the command line

fio --bs=4k --size=128m --direct=1 --runtime=10 --rw=randread
--numjobs=32 --group_reporting --time_based --name=128m

I see only this:

shmget: No space left on device
error: failed to setup shm segment

Environment:
# cat /etc/redhat-release
CentOS release 6.3 (Final)

# uname -a
Linux vpseer 2.6.32-042stab059.7 #1 SMP Tue Jul 24 19:12:01 MSK 2012
x86_64 x86_64 x86_64 GNU/Linux

# virt-what
openvz

# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/simfs            52428800   1590532  50838268   4% /
none                    526336         4    526332   1% /dev
none                    526336         0    526336   0% /dev/shm

If additional info required, please tell me.
Thanks.

Sincerely,
Konstantin

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

* Re: fio 2.0.9 fails: shmget: No space left on device
  2012-09-21 11:51 fio 2.0.9 fails: shmget: No space left on device Konstantin Boyandin
@ 2012-09-21 12:15 ` Jens Axboe
  2012-09-21 12:34   ` Konstantin Boyandin
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2012-09-21 12:15 UTC (permalink / raw)
  To: Konstantin Boyandin; +Cc: fio

On 09/21/2012 01:51 PM, Konstantin Boyandin wrote:
> Hello,
> 
> When trying to run the command line
> 
> fio --bs=4k --size=128m --direct=1 --runtime=10 --rw=randread
> --numjobs=32 --group_reporting --time_based --name=128m
> 
> I see only this:
> 
> shmget: No space left on device
> error: failed to setup shm segment

Hmmm. Can you send me the output of:

$ grep . /proc/sys/kernel/shm*
$ ipcs -l
$ ipcs -m


-- 
Jens Axboe


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

* Re: fio 2.0.9 fails: shmget: No space left on device
  2012-09-21 12:15 ` Jens Axboe
@ 2012-09-21 12:34   ` Konstantin Boyandin
  2012-09-21 12:37     ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Konstantin Boyandin @ 2012-09-21 12:34 UTC (permalink / raw)
  To: fio; +Cc: Jens Axboe

Hello Jens,

On 09/21/2012 07:15 PM, Jens Axboe wrote:
> On 09/21/2012 01:51 PM, Konstantin Boyandin wrote:
>> Hello,
>>
>> When trying to run the command line
>>
>> fio --bs=4k --size=128m --direct=1 --runtime=10 --rw=randread
>> --numjobs=32 --group_reporting --time_based --name=128m
>>
>> I see only this:
>>
>> shmget: No space left on device
>> error: failed to setup shm segment
> 
> Hmmm. Can you send me the output of:
> 
> $ grep . /proc/sys/kernel/shm*

/proc/sys/kernel/shmall:2097152
/proc/sys/kernel/shmmax:33554432
/proc/sys/kernel/shmmni:4096
/proc/sys/kernel/shm_rmid_forced:0

> $ ipcs -l

------ Shared Memory Limits --------
max number of segments = 4096
max seg size (kbytes) = 32768
max total shared memory (kbytes) = 8388608
min seg size (bytes) = 1

------ Semaphore Limits --------
max number of arrays = 128
max semaphores per array = 250
max semaphores system wide = 32000
max ops per semop call = 32
semaphore max value = 32767

------ Messages: Limits --------
max queues system wide = 6365
max size of message (bytes) = 8192
default max size of queue (bytes) = 16384

> $ ipcs -m

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status

The VM wasn't restarted after the fio failed run.

fio was run by root user.

Sincerely,
Konstantin


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

* Re: fio 2.0.9 fails: shmget: No space left on device
  2012-09-21 12:34   ` Konstantin Boyandin
@ 2012-09-21 12:37     ` Jens Axboe
  2012-09-21 13:02       ` Konstantin Boyandin
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2012-09-21 12:37 UTC (permalink / raw)
  To: Konstantin Boyandin; +Cc: fio

On 09/21/2012 02:34 PM, Konstantin Boyandin wrote:
> Hello Jens,
> 
> On 09/21/2012 07:15 PM, Jens Axboe wrote:
>> On 09/21/2012 01:51 PM, Konstantin Boyandin wrote:
>>> Hello,
>>>
>>> When trying to run the command line
>>>
>>> fio --bs=4k --size=128m --direct=1 --runtime=10 --rw=randread
>>> --numjobs=32 --group_reporting --time_based --name=128m
>>>
>>> I see only this:
>>>
>>> shmget: No space left on device
>>> error: failed to setup shm segment
>>
>> Hmmm. Can you send me the output of:
>>
>> $ grep . /proc/sys/kernel/shm*
> 
> /proc/sys/kernel/shmall:2097152
> /proc/sys/kernel/shmmax:33554432
> /proc/sys/kernel/shmmni:4096
> /proc/sys/kernel/shm_rmid_forced:0
> 
>> $ ipcs -l
> 
> ------ Shared Memory Limits --------
> max number of segments = 4096
> max seg size (kbytes) = 32768
> max total shared memory (kbytes) = 8388608
> min seg size (bytes) = 1
> 
> ------ Semaphore Limits --------
> max number of arrays = 128
> max semaphores per array = 250
> max semaphores system wide = 32000
> max ops per semop call = 32
> semaphore max value = 32767
> 
> ------ Messages: Limits --------
> max queues system wide = 6365
> max size of message (bytes) = 8192
> default max size of queue (bytes) = 16384
> 
>> $ ipcs -m
> 
> ------ Shared Memory Segments --------
> key        shmid      owner      perms      bytes      nattch     status
> 
> The VM wasn't restarted after the fio failed run.
> 
> fio was run by root user.

Oh, try with this please.

diff --git a/init.c b/init.c
index da1f472..b3215f5 100644
--- a/init.c
+++ b/init.c
@@ -254,7 +254,7 @@ static int setup_thread_area(void)
 		shm_id = shmget(0, size, IPC_CREAT | 0600);
 		if (shm_id != -1)
 			break;
-		if (errno != EINVAL && errno != ENOMEM) {
+		if (errno != EINVAL && errno != ENOMEM && errno != ENOSPC) {
 			perror("shmget");
 			break;
 		}

-- 
Jens Axboe


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

* Re: fio 2.0.9 fails: shmget: No space left on device
  2012-09-21 12:37     ` Jens Axboe
@ 2012-09-21 13:02       ` Konstantin Boyandin
  2012-09-21 13:06         ` Jens Axboe
  0 siblings, 1 reply; 6+ messages in thread
From: Konstantin Boyandin @ 2012-09-21 13:02 UTC (permalink / raw)
  To: Jens Axboe; +Cc: fio

Hello Jens,

On 09/21/2012 07:37 PM, Jens Axboe wrote:
> On 09/21/2012 02:34 PM, Konstantin Boyandin wrote:
>> Hello Jens,
>>
>> On 09/21/2012 07:15 PM, Jens Axboe wrote:
>>> On 09/21/2012 01:51 PM, Konstantin Boyandin wrote:
>>>> Hello,
>>>>
>>>> When trying to run the command line
>>>>
>>>> fio --bs=4k --size=128m --direct=1 --runtime=10 --rw=randread
>>>> --numjobs=32 --group_reporting --time_based --name=128m
>>>>
>>>> I see only this:
>>>>
>>>> shmget: No space left on device
>>>> error: failed to setup shm segment
>>>
>>> Hmmm. Can you send me the output of:
>>>
>>> $ grep . /proc/sys/kernel/shm*
>>
>> /proc/sys/kernel/shmall:2097152
>> /proc/sys/kernel/shmmax:33554432
>> /proc/sys/kernel/shmmni:4096
>> /proc/sys/kernel/shm_rmid_forced:0
>>
>>> $ ipcs -l
>>
>> ------ Shared Memory Limits --------
>> max number of segments = 4096
>> max seg size (kbytes) = 32768
>> max total shared memory (kbytes) = 8388608
>> min seg size (bytes) = 1
>>
>> ------ Semaphore Limits --------
>> max number of arrays = 128
>> max semaphores per array = 250
>> max semaphores system wide = 32000
>> max ops per semop call = 32
>> semaphore max value = 32767
>>
>> ------ Messages: Limits --------
>> max queues system wide = 6365
>> max size of message (bytes) = 8192
>> default max size of queue (bytes) = 16384
>>
>>> $ ipcs -m
>>
>> ------ Shared Memory Segments --------
>> key        shmid      owner      perms      bytes      nattch     status
>>
>> The VM wasn't restarted after the fio failed run.
>>
>> fio was run by root user.
> 
> Oh, try with this please.
> 
> diff --git a/init.c b/init.c
> index da1f472..b3215f5 100644
> --- a/init.c
> +++ b/init.c
> @@ -254,7 +254,7 @@ static int setup_thread_area(void)
>  		shm_id = shmget(0, size, IPC_CREAT | 0600);
>  		if (shm_id != -1)
>  			break;
> -		if (errno != EINVAL && errno != ENOMEM) {
> +		if (errno != EINVAL && errno != ENOMEM && errno != ENOSPC) {
>  			perror("shmget");
>  			break;
>  		}

The patch worked fine, thank you!
fio works now as expected.

Sincerely,
Konstantin

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

* Re: fio 2.0.9 fails: shmget: No space left on device
  2012-09-21 13:02       ` Konstantin Boyandin
@ 2012-09-21 13:06         ` Jens Axboe
  0 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2012-09-21 13:06 UTC (permalink / raw)
  To: Konstantin Boyandin; +Cc: fio

On 09/21/2012 03:02 PM, Konstantin Boyandin wrote:
> Hello Jens,
> 
> On 09/21/2012 07:37 PM, Jens Axboe wrote:
>> On 09/21/2012 02:34 PM, Konstantin Boyandin wrote:
>>> Hello Jens,
>>>
>>> On 09/21/2012 07:15 PM, Jens Axboe wrote:
>>>> On 09/21/2012 01:51 PM, Konstantin Boyandin wrote:
>>>>> Hello,
>>>>>
>>>>> When trying to run the command line
>>>>>
>>>>> fio --bs=4k --size=128m --direct=1 --runtime=10 --rw=randread
>>>>> --numjobs=32 --group_reporting --time_based --name=128m
>>>>>
>>>>> I see only this:
>>>>>
>>>>> shmget: No space left on device
>>>>> error: failed to setup shm segment
>>>>
>>>> Hmmm. Can you send me the output of:
>>>>
>>>> $ grep . /proc/sys/kernel/shm*
>>>
>>> /proc/sys/kernel/shmall:2097152
>>> /proc/sys/kernel/shmmax:33554432
>>> /proc/sys/kernel/shmmni:4096
>>> /proc/sys/kernel/shm_rmid_forced:0
>>>
>>>> $ ipcs -l
>>>
>>> ------ Shared Memory Limits --------
>>> max number of segments = 4096
>>> max seg size (kbytes) = 32768
>>> max total shared memory (kbytes) = 8388608
>>> min seg size (bytes) = 1
>>>
>>> ------ Semaphore Limits --------
>>> max number of arrays = 128
>>> max semaphores per array = 250
>>> max semaphores system wide = 32000
>>> max ops per semop call = 32
>>> semaphore max value = 32767
>>>
>>> ------ Messages: Limits --------
>>> max queues system wide = 6365
>>> max size of message (bytes) = 8192
>>> default max size of queue (bytes) = 16384
>>>
>>>> $ ipcs -m
>>>
>>> ------ Shared Memory Segments --------
>>> key        shmid      owner      perms      bytes      nattch     status
>>>
>>> The VM wasn't restarted after the fio failed run.
>>>
>>> fio was run by root user.
>>
>> Oh, try with this please.
>>
>> diff --git a/init.c b/init.c
>> index da1f472..b3215f5 100644
>> --- a/init.c
>> +++ b/init.c
>> @@ -254,7 +254,7 @@ static int setup_thread_area(void)
>>  		shm_id = shmget(0, size, IPC_CREAT | 0600);
>>  		if (shm_id != -1)
>>  			break;
>> -		if (errno != EINVAL && errno != ENOMEM) {
>> +		if (errno != EINVAL && errno != ENOMEM && errno != ENOSPC) {
>>  			perror("shmget");
>>  			break;
>>  		}
> 
> The patch worked fine, thank you!
> fio works now as expected.

Excellent. Thanks for the report, fix has been committed.

-- 
Jens Axboe


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

end of thread, other threads:[~2012-09-21 13:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-21 11:51 fio 2.0.9 fails: shmget: No space left on device Konstantin Boyandin
2012-09-21 12:15 ` Jens Axboe
2012-09-21 12:34   ` Konstantin Boyandin
2012-09-21 12:37     ` Jens Axboe
2012-09-21 13:02       ` Konstantin Boyandin
2012-09-21 13:06         ` Jens Axboe

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