See below…
“Mitchell Schoenbrun” <maschoen@pobox.com> wrote in message
news:Voyager.010515135300.211B@schoenbrun.com…
First off… Sorry, it’s not really feasible to be doing a chkfsys on
our
production system (unless I want to come in at 3:00am and shut
everything
down). BUT, I’m fairly certain the file system isn’t corrupt… we
haven’t
had any bad data files for a very long time. I personally check on that
every day.
Corruption can take many forms. If for example you have ever turn ed the
power off while the system had files open it is possble that you’ve
created orphan sectors. These are sectors marked as used, but not
part of any file or directory. CHKFSYS is very good at recovering these.
You can intentionally create orphan’s with the ZAP command. If you have
a leak somehow, via ZAP maybe, eventually you will lose your entire hard
disk and then your system will stop in the middle of the day.
Thanks for your concern… I assure you, I’m a very prudent person. If
there was any practical way I could run chkfsys, I would. But, I’m 99% sure
this isn’t a file system corruption problem. I have run chkfsys on this
node previously, after I started noticing the disk usage discrepancies.
There was no corruption.
One thing I don’t know is how to turn off Fsys preallocation. Is it an
Fsys option? Ideally, I’d like to be able to tune it… or even better
have
access to some sort of ioctl mechanism, so it could be handles on a file
by
file basis.
There does not seem to be an Fsys option to control preallocation. It
seems
to work quite well, and I don’t know any reason why you would want to turn
it
off. The alternative would be to speed up fragmenation on your disk. You
can
however make an end run around it if you want. To do this, never just
open a file
and write to it. Instead, preallocate your files yourself. Open them for
write,
create as large a file as you will need and then close the file. Then
re-open the
file in update mode. You will have to keep track of the end of file
yourself.
This is probably not what you are looking for.
Thanks for confirming that… I’m not blind! Yes, I agree, it does work
quite well. That’s why I’d prefer to tune it or deal with it on an
individual file basis.
One other thing I don’t know for sure… does the preallocation work on
just
open files or is it part of Fsys’ caching mechanism e.g. extends/exists
beyond a close of a file.
When you close a file properly, there should be no extra allocated
sectors.
There may be some unallocated bytes in the last sector.
David’s response seems to contradict that… I’ll be investigating further.
The reason I ask is, we are a transaction
acquirer. We have a lot of (not so small) files. The basic method used
for
transaction logging is to open in append mode, write a transaction and
close
the file. At any given moment there really aren’t a lot of files open
on
the system, but over an extended period there are hundreds of files
being
appended to regularly.
This is likely to cause a lot of fragmentation on your disk.
I wonder if this is causing the system to create so many
inodes that they are leaching sectors from your system. Try
“ls -x” on one of your files. If the 2nd number is very
large then this may be your problem.
I totally undestand and agree. For transaction files, no it’s not a big
number. I’m beginning to conclude that “normal” append mode writes aren’t
the problem here.
Also, do you or anyone else out there know of any utilities I could use
to
diagnose this problem? The only thing that I’ve run across is the -x
option
to ls. And you know what… it’s got the ‘G’ flag set for all our
active
transactions files (Meaning an extent is reserved beyond the EOF)…
Hmmm?
I’d really like to know how big that preallocated extent is on a file by
file basis.
I recall Bill Flowers explaining that it is situation dependent. For
example,
lets say you open a file and write 10 sequential sectors. The system
might
preallocate 10 more. If you keep on writing sequential sectors, the
system
preallocates larger and large blocks up to some limit. I don’t think the
limit
itself is all that large compared to the size of a disk.
OK… now I’ll really through a wrench in all this…
We run redundant processing centers. Any transaction that hits one
processing center gets replicated to the other processing center. The
counter part to the node in question is pretty much a mirror, file
system
wise. Running a ‘df’ on that node reports 45% used for /u. Which is
what I
would expect… it matches the ‘du -k’… ‘ls -x’ shows a ‘G’ for all
transaction files there also??
I think the G is probably just telling you that the file is open and being
written to. How is the 2nd machine mirror’d. Do the transactions come in
one by one, or are they updated in blocks?
A single transaction at a time. Transaction processing is identical on both
systems. Again, I don’t think append mode writes are the problem here.
See my database comments/suspicions in another reply.
The only other variable I can think of is there are more database
processes
running on the node I’m having problems with (it’s counter part just
keeps
copies of the database files, but not the active processes). There
aren’t
very may files associated with this, but they are always open. When
they
grow, they do so in rather large chunks (like 100-300k at a time). I
wonder
what the algorithm is for preallocation? Is it some multiple of the
requested extent/last write past EOF?
I think it is something like this.
Thanks Mitchell
Mitchell Schoenbrun --------- > maschoen@pobox.com