Operating System - Linux
1828949 Members
2359 Online
109986 Solutions
New Discussion

Linux vs. HP-UX memory comparison

 
SOLVED
Go to solution
Franky Leeuwerck_2
Super Advisor

Linux vs. HP-UX memory comparison

Hi,

Traditionally I'm working on HP-UX 11i platforms. On these systems, memory can be roughly divided (see Glance utility) in :
'System code', 'user code' and 'OS buffer cache'.

Is there something like 'OS buffer cache' on Linux that can be tuned ?

Franky
18 REPLIES 18
Steven E. Protter
Exalted Contributor

Re: Linux vs. HP-UX memory comparison

I've been using both OS for a while now. I'm an HP-UX CSA.

Some reading on the Linux side:

http://www.oreilly.com/catalog/spt2/chapter/ch04.html

http://www.puschitz.com/TuningLinuxForOracle.shtml

The links should start you off.

I have found Linux less flexible and tunable than HP-UX. That may be due to my lower experience on the OS.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Claudio Cilloni
Honored Contributor

Re: Linux vs. HP-UX memory comparison

I remember something about a new dynamic parameter (in 2.6 kernel series) that lets to set the memory space to be dedicated to disk buffers.
I hope other forumers here could give more informations.

Ciao
Claudio
Franky Leeuwerck_2
Super Advisor

Re: Linux vs. HP-UX memory comparison

Thanks for the answers so far, especially the one referring to the Oracle tuning tips on Linux.

I'll leave this issue open in case others can add something to it.

Regards,

Franky.
xyko_1
Esteemed Contributor

Re: Linux vs. HP-UX memory comparison

Hi Franky,

you may configure how much of real memory will be used for io buffers.

from redhat manuals at /proc/sys/vm you have :

buffermem â Allows you to control the percentage amount of total system memory to be used for buffer memory. Typical output for this file looks like this:

2 10 60

The first and last values set the minimum and maximum percentage of memory to be used as buffer memory, respectively. The middle value sets the percentage of system memory dedicated to buffer memory where the memory management subsystem will begin to clear buffer cache more than other kinds of memory to compensate for a general lack of free memory.

see also sysctl command and /proc filesystem to dynamically configure kernel parameters.

regards,
x
Franky Leeuwerck_2
Super Advisor

Re: Linux vs. HP-UX memory comparison

Hello Xyko,

Thanks for the certainly interesting response, however can you tell me again what the command exactly looks like to retrieve the min/max IO cache parms ?

Regards,
Franky
xyko_1
Esteemed Contributor
Solution

Re: Linux vs. HP-UX memory comparison

Hi Franky,

you may use the command
#sysctl -a
to retrieve all active kernel parameters.

To see buffermem you may use
#sysctl -a | grep buffermem

To change the values of any kernel parameter you have to change /etc/sysctl.conf and issue the command
#sysctl -p

To change buffermem, edit /etc/sysctl.conf and insert the line
vm.buffermem = xx yy zz
where xx yy zz are the new values.

Display the actual ram distribution with the command
#free

alter the buffermem parameter to the values that you want and execute the command free again to see the new configuration.

Here you can find some old but yet useful information.
http://ldp.rtin.bz/LDP/solrhe/Securing-Optimizing-Linux-RH-Edition-v1.3/chap6sec69.html

Hope it helps you.
Xyko

Ted M Johnson_1
Frequent Advisor

Re: Linux vs. HP-UX memory comparison

Also, be careful in your interpretation of the output of these commands.

Linux has a lazy memory manager; it will not free used memory unless there is memory pressure. You can verify this by using "watch free" or a similar utility while running a noisy command (maybe a 4G file move?). So, don't be alarmed when your system seems to run at (what in hpux would be) high memory utilization.

In other words, don't try to tune your linux system to have the same charastics as the hpux server you were using.

Franky Leeuwerck_2
Super Advisor

Re: Linux vs. HP-UX memory comparison

Thanks Xyko !
That was the information I was looking for.

Ted,
Thanks for your feedback also. It's clear that HP-UX works differently regarding this matter.

Franky
Franky Leeuwerck_2
Super Advisor

Re: Linux vs. HP-UX memory comparison

Xyko,

One more question.

There is no entry for buffermem in the sysctl -a output.

Does this mean that the IO buffer cache is configured in another way, or is it set to the Linux default values whatever these may be ?

Franky
xyko_1
Esteemed Contributor

Re: Linux vs. HP-UX memory comparison

Hi Franky,

what distro (linux) are you running ?

Xyko
Franky Leeuwerck_2
Super Advisor

Re: Linux vs. HP-UX memory comparison

Hi Xyko,

Thanks for picking the question.
# uname -a
Linux apps12 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386 GNU/Linux

Regards,
Franky

xyko_1
Esteemed Contributor

Re: Linux vs. HP-UX memory comparison

Sorry Franky but thatâ s not the information that I need.

I need to know if you are running Fedora Core, Red Hat, Mandrake or any other flavor of linux distro and the release of it.

Iâ ll be waiting for you.

Regards,
Franky Leeuwerck_2
Super Advisor

Re: Linux vs. HP-UX memory comparison

Xyko,

We are running with :
Red Hat Linux release 8.0 (Psyche)
Kernel 2.4.18-14 on an i686


Franky
xyko_1
Esteemed Contributor

Re: Linux vs. HP-UX memory comparison

Franky,

I don't have any rh 8.0 to see what is happening.

I suggest you to install kernel source and see the file /usr/src/linux/Documenation/sysctl/vm.txt

This file documents all /proc parameters related to memory adjustment and more.

Please, give us a feedback about that.

regards,
xyko
Franky Leeuwerck_2
Super Advisor

Re: Linux vs. HP-UX memory comparison

Hello Xyko,

Thanks for the tip.

I checked the documentation on /usr/src/linux-2.4.18-14/Documentation/sysctl/vm.txt

The txt file refers to the following /proc/sys/vm files
- bdflush
- buffermem
- freepages
- kswapd
- max_map_count
- overcommit_memory
- page-cluster
- pagecache
- pagetable_cache
but these files are actually present :
bdflush
max_map_count
min-readahead
page-cluster
kswapd
max-readahead
overcommit_memory
pagetable_cache

Thanks.
Franky
xyko_1
Esteemed Contributor

Re: Linux vs. HP-UX memory comparison

Hi Franky,

I can't understand why buffermem is not present . All documentation about rh 8 refers to buffermem and I didn't find any reports of bugs or anything else that explains buffermem faulty ?

I'm very sorry.

I'll continue looking for that. I suggest you try to open a thread on a redhat forum (http://www.redhat.com/mailman/listinfo/redhat-list/) about that and, if possible, and return news to us.

Regards,
Xyko
Franky Leeuwerck_2
Super Advisor

Re: Linux vs. HP-UX memory comparison

Hello Xyko,

Thanks for all of your feedback.
It gave me a better insight into Linux memory topics.

Please don't put anymore time in further research.

At this moment the system is not running bad. I'll check on other Linux systems that we have if they also miss a buffermem file.

Regards,
Franky

xyko_1
Esteemed Contributor

Re: Linux vs. HP-UX memory comparison

Ok Franky,

good luck for you.

regards,
xyko