lkml.org 
[lkml]   [2003]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [OT] No Swap. Re: [BUG 2.6.90-test5] kernel shits itself with 48mb ram under moderate load


On Sun, 28 Sep 2003, Ihar 'Philips' Filipau wrote:

> Mikulas Patocka wrote:
> >>>Oh, it does matter. My workstation has 1 GB RAM and 2 GB swap and I hardly
> >>>see any problems with paging <g>.
> >>
> >> Because your workload doesn't hit the 1GB limit.
> >> Actually we just do not have fast enough I/O + CPU to utilize 1GB of
> >>RAM efficiently.
> >>
> >> But if you will go into 128MB of RAM - you will see difference, where
> >>should be no difference.
> >>
> >> Let's say (my personal exp.) cp'ing of kernel source with 0.5/0.25 GB
> >>RAM dosn't differ. Aproximately the same time. 0.25GB little bit faster
> >>- but it can be written off to noise. But try to do the same cp with
> >>0.125GB - this cp (as of RH 2.4.20-20.9 +ext3 -swap) takes _*two*_ times
> >>longer. Should it be?
> >
> > Yes, it should. If you have 0.25GB, it can be copied into cache. If you
> > have 0.125GB, it doesn't fit there.
> >
>
> So you want to say to effectively copy (or whatever) 40GB harddrive I
> have to have 40GB of RAM? Ridiculous.

If you have plenty of RAM and you use cp command, you read data from disk
and copy them to RAM only, the kernel doesn't write them to disk.

If you copy more data than RAM, the data are read from disk and written to
disk again because RAM can't hold them. That's why you see 2 times
slowdown when you use machine with less RAM. It's perfectly OK.

Other unices (Solaris, IRIX) don't have dynamic cache that resizes
according to RAM, always copy data from disk to disk and so they are
order-of-magnitude slower than Linux. Did you ever tried to grep for
symbols in linux source tree unpacked on Solaris box with 512MB RAM? ---
it's just as slow as linux with very few RAM, because Solaris can't cache
data in RAM.

> Especially if copying is done in 4k lumps. (cp's default buffer)

It doesn't matter what's copy buffer size (except for syscall overhead).
Kernel does both read-ahead and write-behind with request joining.

> <sarcasm flavour=sad> Hopefully not everyone shares your opinion. </sarcasm>

Mikulas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.060 / U:9.628 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site