How continuously spinning sync() call can cause high IO wait?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
From what I undertstand from sync()
library call is that it allows a process to flush all dirty buffers to disk
The service routine sys_sync( ) of the sync( ) system call invokes a
series of auxiliary functions:
wakeup_bdflush(0);
sync_inodes(0);
sync_supers( );
sync_filesystems(0);
sync_filesystems(1);
sync_inodes(1);
If i run sync()
call once, after that there shouldn't be anything in the buffer.
I am using a tool called stress
that when runs with -i
flag spawn N workers spinning on sync(),
stress --i 1
This command suppose to consume high IO wait since it keep sending sync()
calls,
I confirmed it using ltrace
,
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
Can someone please explain why continuous sync calls consume a lot of IO? I was assuming that after first sync call buffer should be empty.
linux
add a comment |Â
up vote
0
down vote
favorite
From what I undertstand from sync()
library call is that it allows a process to flush all dirty buffers to disk
The service routine sys_sync( ) of the sync( ) system call invokes a
series of auxiliary functions:
wakeup_bdflush(0);
sync_inodes(0);
sync_supers( );
sync_filesystems(0);
sync_filesystems(1);
sync_inodes(1);
If i run sync()
call once, after that there shouldn't be anything in the buffer.
I am using a tool called stress
that when runs with -i
flag spawn N workers spinning on sync(),
stress --i 1
This command suppose to consume high IO wait since it keep sending sync()
calls,
I confirmed it using ltrace
,
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
Can someone please explain why continuous sync calls consume a lot of IO? I was assuming that after first sync call buffer should be empty.
linux
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
From what I undertstand from sync()
library call is that it allows a process to flush all dirty buffers to disk
The service routine sys_sync( ) of the sync( ) system call invokes a
series of auxiliary functions:
wakeup_bdflush(0);
sync_inodes(0);
sync_supers( );
sync_filesystems(0);
sync_filesystems(1);
sync_inodes(1);
If i run sync()
call once, after that there shouldn't be anything in the buffer.
I am using a tool called stress
that when runs with -i
flag spawn N workers spinning on sync(),
stress --i 1
This command suppose to consume high IO wait since it keep sending sync()
calls,
I confirmed it using ltrace
,
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
Can someone please explain why continuous sync calls consume a lot of IO? I was assuming that after first sync call buffer should be empty.
linux
From what I undertstand from sync()
library call is that it allows a process to flush all dirty buffers to disk
The service routine sys_sync( ) of the sync( ) system call invokes a
series of auxiliary functions:
wakeup_bdflush(0);
sync_inodes(0);
sync_supers( );
sync_filesystems(0);
sync_filesystems(1);
sync_inodes(1);
If i run sync()
call once, after that there shouldn't be anything in the buffer.
I am using a tool called stress
that when runs with -i
flag spawn N workers spinning on sync(),
stress --i 1
This command suppose to consume high IO wait since it keep sending sync()
calls,
I confirmed it using ltrace
,
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
sync() = 0
Can someone please explain why continuous sync calls consume a lot of IO? I was assuming that after first sync call buffer should be empty.
linux
linux
asked 7 mins ago
MaverickD
525
525
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475500%2fhow-continuously-spinning-sync-call-can-cause-high-io-wait%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password