From: Harald Anlauf <anlauf@gmx.de>
To: "Bertini, Denis Dr." <D.Bertini@gsi.de>
Cc: Tobias Burnus <tobias@codesourcery.com>,
"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Subject: Re: Problem setting buffer size for gfortran ( v 11.2)
Date: Fri, 25 Feb 2022 21:44:53 +0100 [thread overview]
Message-ID: <9546ace7-cab6-9115-e83a-2a4eecab191f@gmx.de> (raw)
Message-ID: <20220225204453.KJaqRCegIVmA33bZw3BYAZcKPhl3CvR_MAdPzRYCRnY@z> (raw)
In-Reply-To: <c4fd08a52e4947ddbaee3982a3ad681f@gsi.de>
Hi Denis,
> export GFORTRAN_UNFORMATTED_BUFFER_SIZE=10000
> export GFORTRAN_FORMATTED_BUFFER_SIZE=10000
> export GFORTRAN_UNBUFFERED_ALL=n
>
> From the output log indeed i got the correct env. variable as i set:
>
>
> GFORTRAN_FORMATTED_BUFFER_SIZE=10000
>
>
> But from strace output i got always
>
>
>>>>>>>>>>>>>>>>>>>>>>>
>
> write(3, "\0\0\0\0\0\0\10@\0\0\0\340\314\314\10@\0\0\0\240\231\231\t@\0\0\0`ff\n@"..., 8192) = 8192
> write(3, "\0\0\0@33\v@\0\0\0\0\0\0\f@\0\0\0\340\314\314\f@\0\0\0\240\231\231\r@"..., 8192) = 8192
> write(3, "\0\0\0`ff\16@\0\0\0@33\17@\0\0\0\0\0\0\20@\0\0\0`ff\20@"..., 8192) = 8192
> write(3, "\0\0\0\340\314\314\20@\0\0\0@33\21@\0\0\0\240\231\231\21@\0\0\0\0\0\0\22@"..., 8192) = 8192
> write(3, "\0\0\0`ff\22@\0\0\0\340\314\314\22@\0\0\0@33\23@\0\0\0\240\231\231\23@"..., 8192) = 8192
> write(3, "\0\0\0\0\0\0\24@\0\0\0`ff\24@\0\0\0\340\314\314\24@\0\0\0@33\25@"..., 8192) = 8192
> .....
>>>>>>>>>>>>>>>>>>>
> Showing the fixed that still a 8kiB buffer size is effectively ude in I/O...
did you ever think of trying other values than 10000?
On my Linux laptop, buffering is done in multiples of 2k.
If I set GFORTRAN_UNFORMATTED_BUFFER_SIZE=14000, I get writes in
sizes of 12288. Which is likely more efficient than asking for
exactly 14000.
Cheers,
Harald
next prev parent reply other threads:[~2022-02-25 20:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 16:10 Bertini, Denis Dr.
2022-02-23 18:26 ` Harald Anlauf
2022-02-23 18:26 ` Harald Anlauf
2022-02-23 20:28 ` Bertini, Denis Dr.
2022-02-23 20:57 ` Harald Anlauf
2022-02-23 20:57 ` Harald Anlauf
2022-02-23 20:59 ` Bertini, Denis Dr.
[not found] ` <trinity-9bf94afe-e773-4366-b0b2-ae398de80664-1645651097363@3c-app-gmx-bs49>
2022-02-23 21:23 ` Bertini, Denis Dr.
2022-02-23 21:38 ` Harald Anlauf
2022-02-24 7:57 ` Bertini, Denis Dr.
2022-02-24 8:13 ` Tobias Burnus
2022-02-24 8:15 ` Bertini, Denis Dr.
2022-02-24 8:20 ` Tobias Burnus
2022-02-25 17:28 ` Bertini, Denis Dr.
[not found] ` <trinity-59001f50-077d-424e-a648-24645944dd0c-1645813711633@3c-app-gmx-bap28>
2022-02-25 20:01 ` Bertini, Denis Dr.
2022-02-25 20:44 ` Harald Anlauf [this message]
2022-02-25 20:44 ` Harald Anlauf
2022-02-25 20:53 ` Bertini, Denis Dr.
2022-02-26 9:20 ` Thomas Koenig
2022-02-26 15:37 ` Bertini, Denis Dr.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9546ace7-cab6-9115-e83a-2a4eecab191f@gmx.de \
--to=anlauf@gmx.de \
--cc=D.Bertini@gsi.de \
--cc=fortran@gcc.gnu.org \
--cc=tobias@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).