Bug 204688 - out of swap space due to intensive disk IO
Summary: out of swap space due to intensive disk IO
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.2-STABLE
Hardware: amd64 Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-19 21:02 UTC by Andrey Blochintsev
Modified: 2018-04-18 13:56 UTC (History)
3 users (show)

See Also:


Attachments
dmesg.boot + vmstat of testted systems (12.63 KB, application/gzip)
2015-11-19 21:02 UTC, Andrey Blochintsev
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Blochintsev 2015-11-19 21:02:01 UTC
Created attachment 163344 [details]
dmesg.boot + vmstat of testted systems

Intensive disk IO leads to "out of swap space" at system without configured swap.
Test system: 
8Gb RAM, i7 CPU, 500G SSD (dmesg boot, vmstat outputs attached), NO SWAP, UFS filesystems (softupdates+trim flags enabled), fdisk+disklabel partitionig

amd64 10.2-STABLE r290985M userland+kernel
amd64 10.2 release kernel compiled from sources 10.2-STABLE r290985M userland + 10.2-STABLE r290985M userland

How to reproduce:
1. Prepare files with total size more than RAM 

for i in `jot 16 101`
do
 bs=1m count=1024 if=/dev/zero of=file_$i.bin
done

ls -la *bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:21 file_101.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_102.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_103.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_104.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_105.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_106.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_107.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_108.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_109.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_110.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_111.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_112.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_113.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_114.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_115.bin
-rw-r--r--  1 bag  bag  1073741824 Nov 19 21:22 file_116.bin



2. Reboot to test system then run test script
for i in file*.bin
do
        dd bs=1m if=$i of=/dev/null
done


3 amd64 10.2 release kernel: no problems
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.085321 secs (514904828 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.135202 secs (502876008 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.131729 secs (503695301 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.137902 secs (502240895 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.136251 secs (502629063 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.137830 secs (502257866 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.133230 secs (503340867 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.166784 secs (495546357 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.136592 secs (502548858 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.142595 secs (501140812 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.154938 secs (498270406 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.126926 secs (504832726 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.147977 secs (499885132 bytes/sec)
1024+0 records in
1024+0 records out
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.138070 secs (502201411 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.154765 secs (498310432 bytes/sec)


4 Reboot to amd64 10.2-STABLE r290985M then run test script
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.086252 secs (514675043 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.135337 secs (502844172 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.132365 secs (503545045 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.137970 secs (502224932 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.136101 secs (502664350 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.137171 secs (502412680 bytes/sec)
1024+0 records in
1024+0 records out
1073741824 bytes transferred in 2.133041 secs (503385482 bytes/sec)

<OOOPS!! dd killed, script killed, login session killed

/var/log/messages
Nov 19 21:44:59 znmb2 kernel: pid 469 (devd), uid 0, was killed: out of swap spa
ce
Nov 19 21:44:59 znmb2 kernel: pid 872 (tcsh), uid 200, was killed: out of swap s
pace
Nov 19 21:45:00 znmb2 kernel: pid 908 (tcsh), uid 200, was killed: out of swap space
Comment 1 Andrey Blochintsev 2015-11-19 21:06:30 UTC
FreeBSD 11.0-CURRENT #0 r290865M is affected
Comment 2 ota 2017-10-17 04:14:24 UTC
I think the message, "out of swap space", is misleading.
This is rather "out of memory."