|
forums.silverfrost.com Welcome to the Silverfrost forums
|
View previous topic :: View next topic |
Author |
Message |
KennyT
Joined: 02 Aug 2005 Posts: 317
|
Posted: Mon Sep 11, 2017 7:04 pm Post subject: do you find windows10 disc usage goes to 100% while reading? |
|
|
if you do, it might be caused by switching open datafiles too often.
e.g.
do nu=7,20
open(nu)
end do
!this causes 100% disk access
do jrec=1,100
do nu=7,20
read(nu, rec=jrec) data
end do
end do
!this doesn't
do nu=7,20
do jrec=1,100
read(nu, rec=jrec) data
end do
end do
K |
|
Back to top |
|
|
wahorger
Joined: 13 Oct 2014 Posts: 1217 Location: Morrison, CO, USA
|
Posted: Thu Jan 04, 2018 10:35 pm Post subject: |
|
|
I would venture to say that the second example (not 100%) is because there is a buffer that is being filled, and only 1 (or a small number) of actual I/O being performed on each file.
The former example likely requires that the input be "flushed" for each record from a different file, so you are getting, in essence, 1400(+) I/O operations.
Many I/O systems will pre-buffer input data because it it as efficient to read multiple sectors from a file as it is to read one sector.
Similarly, buffering output data is done again to reduce the I/O calls to the operating system. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|