Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Alpha Linux Memory size?
@ 2000-08-08  0:31 Eugene Chu
  2000-08-08  0:45 ` Greg Lindahl
  0 siblings, 1 reply; 13+ messages in thread
From: Eugene Chu @ 2000-08-08  0:31 UTC (permalink / raw)
  To: axp-list

Hello,

I'm getting conflicting responses to this.  Does anyone know what is the
maximum memory that Linux can address on an Alpha platform?

eyc




^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: Alpha Linux Memory size?
  2000-08-08  0:31 Eugene Chu
@ 2000-08-08  0:45 ` Greg Lindahl
  2000-08-08 14:07   ` Jay Estabrook
  0 siblings, 1 reply; 13+ messages in thread
From: Greg Lindahl @ 2000-08-08  0:45 UTC (permalink / raw)
  To: axp-list

> I'm getting conflicting responses to this.  Does anyone know what is the
> maximum memory that Linux can address on an Alpha platform?

Until recently, 1-2 GB, depending. Now there is a bigmemory patch that works
on several architectures which raises it to however much you like stuffing
in a machine.

-- g




^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: Alpha Linux Memory size?
@ 2000-08-08  1:26 Eugene Chu
  2000-08-08  1:49 ` Greg Lindahl
  0 siblings, 1 reply; 13+ messages in thread
From: Eugene Chu @ 2000-08-08  1:26 UTC (permalink / raw)
  To: axp-list

Greg Lindahl wrote:

>>I'm getting conflicting responses to this.  Does anyone know what is the
>>maximum memory that Linux can address on an Alpha platform?

>Until recently, 1-2 GB, depending. Now there is a bigmemory patch that works
>on several architectures which raises it to however much you like stuffing
>in a machine.

Thanks for the reply Greg.

This is related to my previous question about direct I/O.  If my
program has a huge memory requirement, I would prefer to use up as much
system memory as is available, thus reducing swapping action.  Now, if
the program needs to read and write a lot of files in the process, I
have another user of memory; file system caching.  I don't know how it
works in Linux, but unified buffer caching usually means that the
system uses up all available memory for file caching.  So I either need
more memory or a file I/O method that bypasses system caching.  Would
the various file systems types available in Linux be able to provide
this capability?

eyc




^ permalink raw reply	[flat|nested] 13+ messages in thread

* RE: Alpha Linux Memory size?
  2000-08-08  1:26 Alpha Linux Memory size? Eugene Chu
@ 2000-08-08  1:49 ` Greg Lindahl
  2000-08-08 17:38   ` Adam C Powell IV
  0 siblings, 1 reply; 13+ messages in thread
From: Greg Lindahl @ 2000-08-08  1:49 UTC (permalink / raw)
  To: axp-list

> This is related to my previous question about direct I/O.  If my
> program has a huge memory requirement, I would prefer to use up as much
> system memory as is available, thus reducing swapping action.

Right. Like most modern Unix implementations, Linux will use all of memory
for disk caching depending on system activity. The traditional way to
represent this in Unix is to mmap the entire file. This works in Linux just
like everywhere else. All filesystems support mmap.

-- greg




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Alpha Linux Memory size?
  2000-08-08  0:45 ` Greg Lindahl
@ 2000-08-08 14:07   ` Jay Estabrook
  0 siblings, 0 replies; 13+ messages in thread
From: Jay Estabrook @ 2000-08-08 14:07 UTC (permalink / raw)
  To: axp-list

On Mon, Aug 07, 2000 at 08:45:19PM -0400, Greg Lindahl wrote:
>
> > I'm getting conflicting responses to this.  Does anyone know what is the
> > maximum memory that Linux can address on an Alpha platform?
> 
> Until recently, 1-2 GB, depending. Now there is a bigmemory patch that works
> on several architectures which raises it to however much you like stuffing
> in a machine.

Kernel 2.2.x unpatched, 2GB on all platforms.

Kernel 2.2.x with Andrea's "bigmem" patches, unlimited.

Kernel 2.4.x unpatched, unlimited.

Andrea's patches, in various forms and revisions, can be found at:

	http://www.kernel.org/pub/linux/kernel/people/andrea/patches/
and/or
	http://www.kernel.org/pub/linux/kernel/people/andrea/kernels/

--Jay++

-----------------------------------------------------------------------------
Jay A Estabrook                            Alpha Engineering - LINUX Project
Compaq Computer Corp. - MRO1-2/K20         (508) 467-2080
200 Forest Street, Marlboro MA 01752       Jay.Estabrook@compaq.com
-----------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Alpha Linux Memory size?
  2000-08-08  1:49 ` Greg Lindahl
@ 2000-08-08 17:38   ` Adam C Powell IV
  2000-08-08 18:08     ` Jeff Sturm
  2000-08-08 21:26     ` Ross A Knepper
  0 siblings, 2 replies; 13+ messages in thread
From: Adam C Powell IV @ 2000-08-08 17:38 UTC (permalink / raw)
  To: axp-list

Greg Lindahl wrote:

> > This is related to my previous question about direct I/O.  If my
> > program has a huge memory requirement, I would prefer to use up as much
> > system memory as is available, thus reducing swapping action.
>
> Right. Like most modern Unix implementations, Linux will use all of memory
> for disk caching depending on system activity. The traditional way to
> represent this in Unix is to mmap the entire file. This works in Linux just
> like everywhere else. All filesystems support mmap.

Correct me if I'm wrong, but I interpreted the question as:

Is there a way to prevent the disk/file cache from displacing memory used by
processes, so the process data stay in memory and don't get swapped out?

Here's the original question, note the last two sentences in particular (which
you didn't quote):

Eugene Chu wrote:

> Thanks for the reply Greg.
>
> This is related to my previous question about direct I/O.  If my
> program has a huge memory requirement, I would prefer to use up as much
> system memory as is available, thus reducing swapping action.  Now, if
> the program needs to read and write a lot of files in the process, I
> have another user of memory; file system caching.  I don't know how it
> works in Linux, but unified buffer caching usually means that the
> system uses up all available memory for file caching.  So I either need
> more memory or a file I/O method that bypasses system caching.  Would
> the various file systems types available in Linux be able to provide
> this capability?

-Adam P.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Alpha Linux Memory size?
  2000-08-08 17:38   ` Adam C Powell IV
@ 2000-08-08 18:08     ` Jeff Sturm
  2000-08-08 21:26     ` Ross A Knepper
  1 sibling, 0 replies; 13+ messages in thread
From: Jeff Sturm @ 2000-08-08 18:08 UTC (permalink / raw)
  To: axp-list

Adam C Powell IV wrote:
> Correct me if I'm wrong, but I interpreted the question as:
> 
> Is there a way to prevent the disk/file cache from displacing memory used by
> processes, so the process data stay in memory and don't get swapped out?

Isn't that how Linux normally works?  Doesn't the buffer cache shrink before
swapping processes, whenever possible?  That's what I observe on my small memory
systems.  Never tried it with 1GB or more.

--
Jeff Sturm
jeff.sturm@appnet.com




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Alpha Linux Memory size?
  2000-08-08 17:38   ` Adam C Powell IV
  2000-08-08 18:08     ` Jeff Sturm
@ 2000-08-08 21:26     ` Ross A Knepper
  1 sibling, 0 replies; 13+ messages in thread
From: Ross A Knepper @ 2000-08-08 21:26 UTC (permalink / raw)
  To: axp-list

On Tue, 8 Aug 2000, Adam C Powell IV wrote:
> Correct me if I'm wrong, but I interpreted the question as:
> 
> Is there a way to prevent the disk/file cache from displacing memory used by
> processes, so the process data stay in memory and don't get swapped out?

if this is the correct interpretation of the original question, then i
would advise the original poster to investigate the mlock() syscall, which
is used to make sure that user pages remain resident in memory.  of
course, if you have sufficient RAM, you could also accomplish the same
thing by turning off swap :)

 -ross




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Alpha Linux Memory size?
@ 2000-08-08 22:38 Eugene Chu
  2000-08-09  0:10 ` W Bauske
  2000-08-09  1:56 ` Paul Jakma
  0 siblings, 2 replies; 13+ messages in thread
From: Eugene Chu @ 2000-08-08 22:38 UTC (permalink / raw)
  To: axp-list

OK, I think I have a picture.  Thanks to the following for their
replies:

Greg Lindahl
Jay Eastbrook
Adam Powell
Ross Knepper

The maximum memory size that Lunix kernel 2.2.x can recognize is 2 GB.
With application of the bigmem patch, the kernel can use an unlimited
amount of memory.  This feature is already in kernel 2.4.x.  There are
a couple of repositories of patches at:

        http://www.kernel.org/pub/linux/kernel/people/andrea/patches/
and/or
        http://www.kernel.org/pub/linux/kernel/people/andrea/kernels/

which must contain the bigmem patches.

My second question concerned swapping or thrashing when an application
starts to use up all the physical memory in the system, and still needs
to do disk I/O.  With the file system cache that ordinarily takes up
whatever unused memory there is in the system, the performance of such
a program can become unpredictable as it fights with the UBC for memory
(or rather, when it needs memory, and cached data must be flushed).
The mlock function seems like a good way to make sure that the
application has all the memory it needs, just as long as it does not
attempt to lock down so much memory that the rest of the system can no
longer do anything.

The other possibility is to mmap the files and use the VM management
features of the operating system (and maybe hardware) to access the
files as arrays within the program.  There are two problems with this.
First, if the system is memory bound already, there is precious little
memory remaining to let the OS do its thing.  Second, the VM system
usually has no idea how you want to access your data, so it can not
optimally swap the pieces of the data for you.  (Exactly like caching;
the CPU caches only work with prescribed algorithms, and if the way
your program accesses data is not consistent with the way the CPU cache
works, your data access speed will be down to memory speed.)  Many
papers have been written on this subject, including how to provide
hints to the VM using the madvise function.

To alleviate the problem of insufficient physical memory, we are
attempting to do our own memory management using large files.  Since we
know exactly how our program uses its data, we can use separate threads
to perform write-behinds or read-aheads to keep data not currently used
on disk.  But the bugger here is that file I/O uses file system cache,
and CPU cycles to copy between user space and file system cache.  So,
we're looking into using raw partitions as our disk buffers.  At least
on Solaris, I/O to raw disk partitions seems to require no system
buffering whatsoever, so no memory is being used, and no CPU cycles are
wasted in copying between user space and system cache.

thanks again for all the inputs, and further comments are welcome.

eugene




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Alpha Linux Memory size?
  2000-08-08 22:38 Eugene Chu
@ 2000-08-09  0:10 ` W Bauske
  2000-08-09  1:56 ` Paul Jakma
  1 sibling, 0 replies; 13+ messages in thread
From: W Bauske @ 2000-08-09  0:10 UTC (permalink / raw)
  To: axp-list

Eugene Chu wrote:
> 
> To alleviate the problem of insufficient physical memory, we are
> attempting to do our own memory management using large files.  Since we
> know exactly how our program uses its data, we can use separate threads
> to perform write-behinds or read-aheads to keep data not currently used
> on disk.  But the bugger here is that file I/O uses file system cache,
> and CPU cycles to copy between user space and file system cache.  So,
> we're looking into using raw partitions as our disk buffers.  At least
> on Solaris, I/O to raw disk partitions seems to require no system
> buffering whatsoever, so no memory is being used, and no CPU cycles are
> wasted in copying between user space and system cache.
> 
> thanks again for all the inputs, and further comments are welcome.
> 

I regularly run programs using 8-10GB of temp file space on
1GB physical memory systems without trouble using normal ext2
FS I/O. I'd suggest you run some tests with standard I/O before
deciding if you need something exotic. Nothing like really running
the code to decide if it needs fixing.

The only real trick is making your I/O as regular as possible so
the system caching works for you, not against you. I do leave a couple
hundred MB of memory for I/O caching. The amount would depend on what
your algorithm does to the file.


Wes




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Alpha Linux Memory size?
  2000-08-08 22:38 Eugene Chu
  2000-08-09  0:10 ` W Bauske
@ 2000-08-09  1:56 ` Paul Jakma
  1 sibling, 0 replies; 13+ messages in thread
From: Paul Jakma @ 2000-08-09  1:56 UTC (permalink / raw)
  To: axp-list

On Tue, 8 Aug 2000, Eugene Chu wrote:

> and CPU cycles to copy between user space and file system cache.  So,
> we're looking into using raw partitions as our disk buffers.  At least
> on Solaris, I/O to raw disk partitions seems to require no system
> buffering whatsoever, so no memory is being used, 

2.4 has raw/io support which does this (implemented by Stephen
Tweedie). I believe there is a backport patch to 2.2, have a look in
ftp.kernel.org/pub/linux/kernel/people/sct, and i think redhat's
kernel is patched with it. (but i'm not sure)
 
regards,
-- 
Paul Jakma	paul@clubi.ie
PGP5 key: http://www.clubi.ie/jakma/publickey.txt
-------------------------------------------
Fortune:
Dinosaurs aren't extinct.  They've just learned to hide in the trees.




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Alpha Linux Memory size?
@ 2000-08-09 21:29 Eugene Chu
  2000-08-10  0:50 ` Paul Jakma
  0 siblings, 1 reply; 13+ messages in thread
From: Eugene Chu @ 2000-08-09 21:29 UTC (permalink / raw)
  To: axp-list

Hi Paul,

Thanks for your reply.

Do you know what Linux kernel Red Hat's 6.2 is based on?  (Will raw I/O
be available in RH 6.2, or whatever the latest version it is?)

eugene




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Alpha Linux Memory size?
  2000-08-09 21:29 Eugene Chu
@ 2000-08-10  0:50 ` Paul Jakma
  0 siblings, 0 replies; 13+ messages in thread
From: Paul Jakma @ 2000-08-10  0:50 UTC (permalink / raw)
  To: axp-list

On Wed, 9 Aug 2000, Eugene Chu wrote:

> Hi Paul,
> 
> Thanks for your reply.
> 
> Do you know what Linux kernel Red Hat's 6.2 is based on? 

2.2.14 i think, update to 2.2.16 available from RedHat.

>  (Will raw I/O
> be available in RH 6.2, or whatever the latest version it is?)
> 

6.2 is out now. I think you should check RedHat's feature list to see
if raw/io is included.

> eugene
> 

regards,
-- 
Paul Jakma	paul@clubi.ie
PGP5 key: http://www.clubi.ie/jakma/publickey.txt
-------------------------------------------
Fortune:
Dealing with the problem of pure staff accumulation,
all our researches ... point to an average increase of 5.75% per year.
		-- C.N. Parkinson




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2000-08-10  0:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-08-08  1:26 Alpha Linux Memory size? Eugene Chu
2000-08-08  1:49 ` Greg Lindahl
2000-08-08 17:38   ` Adam C Powell IV
2000-08-08 18:08     ` Jeff Sturm
2000-08-08 21:26     ` Ross A Knepper
  -- strict thread matches above, loose matches on Subject: below --
2000-08-09 21:29 Eugene Chu
2000-08-10  0:50 ` Paul Jakma
2000-08-08 22:38 Eugene Chu
2000-08-09  0:10 ` W Bauske
2000-08-09  1:56 ` Paul Jakma
2000-08-08  0:31 Eugene Chu
2000-08-08  0:45 ` Greg Lindahl
2000-08-08 14:07   ` Jay Estabrook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox