IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Odd temporary access restrictions
Does Linux implement file IO locking that
can cause a command not to be able to read
a file? And then some time later it times out
and lets you access the file?

All my history with SCO, Solaris and Linux says
locking is "advisory". If I get a lock on a
file, or a byte range, it really means when
another process tries to get the same it it
is denied, and it is up to the process to
adhere to the denial.

But that is not what seems to be happening here.
But the behaviour is very inconsistent.

Given:
Linux mash.networkmcs.com 2.4.21-15.0.2.ELhugemem #1 SMP Wed Jun 16 22:36:51 EDT 2004 i686 athlon i386 GNU/Linux

Ext3 file system:
/dev/cciss/c0d1p1 on /lf/data type ext3 (rw,acl)


I have a file that is input data to a Windows process
that is accessing it via Samba 3.

This process will grind against the file for a few minutes.
Then SOMETIMES after that I've tried to "wc -l" the file, and
the "wc" hangs for a minute or 2. After that, the wc is
instantaneous.

I can't duplicate though!

Just an annoyance right now.
New prolly a kernel tune issue
-drl
New If you were using nfs I would think the
locking wasnt syncing very well due to wsize rsize mismatches. Perhaps a similar issue via samba. There has to be a lock because the local box doesnt know if mangling a file is being done by another box so the local sharing facility locks and unlocks as requested by the far machine.
thanx,
bill
These miserable swine, having nothing but illusions to live on, marshmallows for the soul in place of good meat, will now stoop to any disgusting level to prevent even those miserable morsels from vanishing into thin air. The country is being destroyed by these stupid, vicious right-wing fanatics, the spiritual brothers of the brownshirts and redstars, collectivists and authoritarians all, who would not know freedom if it bit them on the ass, who spend all their time trying to stamp, bludgeon, and eviscerate the very idea of the individual's right to his own private world. DRL
questions, help? [link|mailto:pappas@catholic.org|email pappas at catholic.org]
New I have been thinking long and hard about this.
This might explain many problems I have seen on a machine.

You need to tweak the /proc/sys/vm/bdflush parameters.

Currently on a heavy machine I use at work I have:
$ cat /proc/sys/vm/bdflush\n70      500    0       0       5000    5000    60      40      0
Your machine prolly looks like this:
$ cat /proc/sys/vm/bdflush\n50      500     0       0       500     3000    80      50      0
A good line for machine with HUGE amounts of Memory would be something

90      2000     0       0       5000    10000   100     50      0
or in /etc/sysctl.conf the line would be:
# Sets the File Systems to be more apropos for heavy IO and HUGE Memory\nvm.bdflush = 90 2000 0 0 5000 10000 100 50 0
There are other pieces that probably would help as well.

Edit:
Matter of fact I have found many pieces that are set too low for RedHat Enterprise Linux when you have 2+ Processors, gobs of memory and are IOWAIT bound. Here is a Good set of additions for you /etc/sysctl.conf:
# Sets the File Systems to be more\n# apropos for heavy IO and HUGE Memory\n# As RH set default are to low for Mega Systems\nvm.bdflush = 90 2000 0 0 5000 10000 100 50 0\nvm.kswapd = 1024 64 16\nvm.page-cluster = 5\nvm.inactive_clean_percent = 100\nvm.pagecache = 2 10 20\n\n# Controls low_latency for the Network driver\n# Being a GB Enet\nnet.ipv4.tcp_low_latency = 1

Oh, BTW, you probably won't REALLY have to do these Barry... Most of these setting are based on recs for Oracle and some for Appservers. Since this machine you have is a combo of everything... makes sense to do em.

Also, look at fs.lease-break-time the default == 45 seconds. (located /proc/sys/fs/lease-break-time. I don't know if you want to change this... but this maybe your wait period or maybe not.

What it comes down to, the machine sometimes has to grind away at the file because it is not cached. For the second wc -l it is in cache.

Since this machine is the one you described here, you are probably getting into the point were having 10GB of Memory is a bad thing, as it has to clear out cached items and put in the new stuff... of course you'd have to be caching at about 9GB, buffering at about 360MB and amoutn Free being in the sub 100MB free, like 40MB free.

Might also want to start thinking about changing the way the machine uses cacheing, and force it to use more memory for buffering as well.
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey
No matter how much Microsoft supporters whine about how Linux and other operating systems have just as many bugs as their operating systems do, the bottom line is that the serious, gut-wrenching problems happen on Windows, not on Linux, not on Mac OS. -- [link|http://www.eweek.com/article2/0,1759,1622086,00.asp|source]
Here is an example: [link|http://www.greymagic.com/security/advisories/gm001-ie/|Executing arbitrary commands without Active Scripting or ActiveX when using Windows]
Expand Edited by folkert Aug. 19, 2004, 12:27:28 PM EDT
Expand Edited by folkert Aug. 19, 2004, 01:12:57 PM EDT
Expand Edited by folkert Aug. 19, 2004, 02:07:24 PM EDT
New Should not apply to you
Linux does support mandatory file locking, but it is not on by default. If you pass 'mand' as an option to mount then you can enable mandatory locking on specific files as you go. So that shouldn't apply to you.

Jay


New Turned out to be:
File System Lease Break Time:

Aug 3 10:44:24 mash kernel: lease broken - owner pid = 9631
Aug 6 08:14:13 mash kernel: lease broken - owner pid = 29909
Aug 10 11:03:37 mash kernel: lease broken - owner pid = 32272
Aug 17 13:48:34 mash kernel: lease broken - owner pid = 11656
Aug 17 13:48:42 mash kernel: lease broken - owner pid = 11656
Aug 18 15:58:54 mash kernel: lease broken - owner pid = 11656
Aug 18 16:07:34 mash kernel: lease broken - owner pid = 11656
Aug 18 16:09:41 mash kernel: lease broken - owner pid = 11656
Aug 19 12:50:34 mash kernel: lease broken - owner pid = 18635


Cheers all.
--
[link|mailto:greg@gregfolkert.net|greg],
[link|http://www.iwethey.org/ed_curry|REMEMBER ED CURRY!] @ iwethey
No matter how much Microsoft supporters whine about how Linux and other operating systems have just as many bugs as their operating systems do, the bottom line is that the serious, gut-wrenching problems happen on Windows, not on Linux, not on Mac OS. -- [link|http://www.eweek.com/article2/0,1759,1622086,00.asp|source]
Here is an example: [link|http://www.greymagic.com/security/advisories/gm001-ie/|Executing arbitrary commands without Active Scripting or ActiveX when using Windows]
     Odd temporary access restrictions - (broomberg) - (5)
         prolly a kernel tune issue -NT - (deSitter)
         If you were using nfs I would think the - (boxley)
         I have been thinking long and hard about this. - (folkert)
         Should not apply to you - (JayMehaffey)
         Turned out to be: - (folkert)

We come here for the righteous indignation and hilarity that follows.
64 ms