[Samba] Will samba work on Linux/486 with heavy swapping?

T H systemloc at yahoo.com
Tue Feb 26 12:17:03 GMT 2002

> OK. That's a 20:1 swap/real memory ratio!
> Conventional wisdom is that 2:1
> is the lowest usable value with 4-5:1 being optimum.
> If you need more than
> that, you're so badly overloading the machine that
> it becomes pretty useless.
> Since you didn't panic at the mention of building a
> kernel, I suspect you've
> done it at least once...
> You mentioned putting a terminal on the serial port
> and getting a report on
> a kernel page fault. If you can get a stack dump and
> trace the problem back
> to the point where someone jumped off into
> never-never land, there's a good
> chance you'll be able to get the problem fixed.
> The fact that you are using RAID is significant. I
> started to 'fine tooth'
> that code and was not entirely happy with what I
> found. They are going to 
> have to redesign that sub-system at least once more
> to get it completely
> right. The on-disk data structures are not what they
> should be. However, 
> it works well enough as it stands to be useful.
> Their error recovery code
> was quite buggy, like most error recovery code is.
> I'm less sure of this than I might be, but I think
> RAID puts a fairly
> heavy load on memory. It ties up a fair number of
> 'chunk size' buffers
> for fairly long periods of time. Normally, a large
> chunk size improves
> performance, but I'd guess that a low memory
> condition would change that.
> On the other hand, I'm not certain that 'chunk size'
> is relevant to RAID 1.
> I know it has a significant impact on RAID 0 and
> RAID 4/5.
> Are you swapping to a RAID? This is generally not a
> good idea. The only
> advantage is that your system doesn't crash if you
> lose your swap drive,
> but the performance costs are quite high; a 30%
> reduction in thruput is 
> typical. On my production machines, I RAID 1'ed the
> '/boot'. '/' and
> '/home' partitions but did not use RAID on the swap
> partitions. If I
> loose a drive, the machine goes down and comes back
> up automatically 
> without the swap partition on the bad drive. Not
> great, but it let's
> me know that the drive is dead! In your case, I'd
> trade the low 
> probability hard drive for the high probability
> kernel panic.
> From a RH 7.2 (2.4.9-21) system:
> dir /proc/sys/vm
> bdflush    kswapd         min-readahead     
> page-cluster
> buffermem  max_map_count  overcommit_memory 
> pagetable_cache
> freepages  max-readahead  pagecache         
> static_inactive_target
> So it's there in the stock kernel. When you say it's
> not there on
> your system, exactly how much of it isn't there?
> I believe you can also set vm.freepages in
> /etc/sysctl.conf to the
> same effect. If you built a kernel without sysctl,
> that would explain
> why you don't see the file.
> kernel.org is the definitive Linux kernel source. I
> mirror a lot of that
> site daily to one of my home machines. I do NOT
> really have time to look
> at much of it though. I've been focusing more on
> SaMBa lately.
> Red Hat does a LOT of testing on the kernel before
> they put their name on
> it. Even the RawHide stuff gets some testing before
> it's posted. They have
> a whole series of patches they apply. That's what
> the second version number
> is about. They send their stuff back to Linus and
> company so eventually
> it either gets into the kernel.org distribution, or
> the problem is fixed
> some other way. I've seen discussion of this on the
> mailing lists.

A little more info: The drive I lost was a 45GbIBM
75GXP. I believe the problems were due to the drive
more then anything, although you're definitely right
that they need to be kept cool. The same drive failed
twice, the second time a low level format didn't help
it, so I had to RMA it. In the meen time, I bought a
new 60Gb 60GXP. I run RAID 1 on both the 75GXP and
60GXP. Because one drive is 15 gigs bigger, I have 15
gigs to play with. That 15 gigs is a 4 gig / partition
and 500 megs of swap.. I use such a big swap simply
because I have so much useless disk space. Since the
linux install is almost minimal, it actually uses less
then 1 Gb. The swap is not in the RAID, I read all
about why not to do that when I was reading about how
to set up RAID. You're right about heavy mem usage.
With a stock kernel (very bloated) the machine used
99% of the memory and was already swapping just after
booting and starting services (nothing major, no
I almost always compile my own kernels as I like them
small and I don't like heavy module usage. I just
patched my 2.4.16 source to 2.4.18 (I made sure to
apply the 2.4.17 patch first) and began a new compile
hoping maybe some bugs were fixed. I haven't tried it
yet, though. Also, I made sure to enable sysctl and
I'm anxious to see if /proc/sys/vm/freepages exists
after booting with the new kernel. The old one has
some of the files you are listing, so I feel sysctl
was turned on. I am thinking of emailing Rik van Riel
and asking about the current state of freepages usage.
He said on the kernel mailing list in 2001 that 2.4
didn't use freepages, but he would look into
implememnting some way to control it again. The docs
in the kernel source (Documentation/sysctl/vm.txt I
think) show it still as valid, but those docs claim
they are for 2.2 kernels! That shouldn't be in the 2.4
Sorry for the misunderstanding, I didn't attach
anything to the serial port, I just ran a VGA monitor
and keyboard to it. That's console for me. I'm not a
complete newbie, but the sysctl stuff is new to me and
I'm learning about it. Also, I don't know how to use
the kernel logs and error msgs to track down what
caused the problem. How can I get a stack dump? Is
this the error msg and all that the kernel dumps to
console and log when it panics?
I tried reproducing the error (copying a file to the
linux box via smb) with the RAID 1 array unmounted and
turned off (raidstop /dev/md0) and I still got the
error, so I'm pretty sure it isn't due to my RAID use.
After I get the new kernel up, I'll stress the machine
using smb but no RAID (It has a fit when the machine
crashes and feels it necessary to rebuild the array
after every crash.. very annoying). Next, if it
exists, I'll try to increase the freepages and see if
that does anything. If it's stable, I'll crank up RAID
and try stressing it some more while serving the RAID
partition. If it's not stable, I'll start looking
though van Riel's patches to the kernel or RH's
I do not like redhat much because they don't like
putting up tar.gz files, just srpm's. This is a pain
for me as I am unwilling to install rpm, so I must
boot my old RH partiton when I want to use rpm. 

Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!

More information about the samba mailing list