View previous topic :: View next topic |
Author |
Message |
McTango n00b
Joined: 11 Dec 2004 Posts: 66 Location: Formosa - Argentina
|
Posted: Thu Jun 18, 2009 3:02 pm Post subject: Kernel memory allocation |
|
|
Hi all...
I remember that earlier kernels used to allocate only 8 MB of physical memory, but now, newer kernels allocates 64 MB.
I have five Ultra5 and one Ultra10 with 256 MB each one, so newer kernels allocates 25% of the available physical memory.
There's a big difference between 8 MB (3,125%) and 64 MB (25%) when machines only have 256 MB.
So... i have some questions:
¿Kernel memory allocation have any effect over free available memory for applications?
if so...¿the performance of the machines could be compromised then?
if so...¿is there any way to reduce the memory allocation for Kernel?
I don't have much knowledge about this question.
Thanks. (And sorry about my english. ) _________________ Charly Tango
Formosa - Argentina
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
To emerge, or not to emerge: that is the question.
_________________ |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9853 Location: almost Mile High in the USA
|
Posted: Thu Jun 18, 2009 8:59 pm Post subject: |
|
|
When you say allocated, what do you mean? Is it reserved by kernel? How did you determine it was locked to kernel and not being available to the memory pool?
Are you compiling more stuff into the kernel?
Granted, kernel bloat is happening. When I first started using Linux I had 300-400KB zImage files. Now I get 1.8MB bzImage files, and my ia64 kernels are upwards 4MB. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
McTango n00b
Joined: 11 Dec 2004 Posts: 66 Location: Formosa - Argentina
|
Posted: Fri Jun 19, 2009 11:14 am Post subject: |
|
|
I don't know if it reserved by kernel, and i can't determine if it was locked to kernel... that's exactly why i'm asking all this.
I would like to know if those 64 MB are reserved only for kernel or not.
Yes, i compiled some things directly as a part of the kernel, not as modules, so my kernel size is near 4MB.
Thanks _________________ Charly Tango
Formosa - Argentina
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
To emerge, or not to emerge: that is the question.
_________________ |
|
Back to top |
|
|
i92guboj Bodhisattva
Joined: 30 Nov 2004 Posts: 10315 Location: Córdoba (Spain)
|
Posted: Fri Jun 19, 2009 12:20 pm Post subject: |
|
|
The ram that's not neede by the kernel is made available to the rest of programs. The kernel maps memory for some purposes, but "mapping" is not the same as "using", and certainly, the kernel never locks memory for obscure purposes when it's never going to be used and it's needed elsewhere... It's usually the other way around: the kernel always try to use as much memory as it can for useful purposes.
I don't have the technical background to answer to your question in a more technical way.
If you have doubt about this, I suggest you to post in the subforum about hardware and the kernel. And if you don't get the answer that you want, post in the linux kernel mailing lists. But I don't think you have to worry about that at all. There are lots of linux boxes with less than 256mb or ram and they all work just fine (within the limits that such old hardware impose, nothing else). |
|
Back to top |
|
|
x22 Apprentice
Joined: 24 Apr 2006 Posts: 208
|
Posted: Mon Jun 22, 2009 10:03 am Post subject: |
|
|
If you want too see how much memory is used for kernel, try this command:
Code: | dmesg | grep Memory |
The output should contain something like this (this is from x86 system):
Code: | 1032480k/1048576k available (1697k kernel code, 15240k reserved, 1000k data, 196k init, 131008k highmem) |
|
|
Back to top |
|
|
McTango n00b
Joined: 11 Dec 2004 Posts: 66 Location: Formosa - Argentina
|
Posted: Mon Jun 22, 2009 2:15 pm Post subject: |
|
|
Thanks a lot for the answers.
Now i have a better perspective about kernel memory usage. I will not worry any more about kernel size.
On SPARC platform, the command "dmesg | grep Memroy" gives: Code: | [ 0.000000] Memory hole size: 256MB
[ 2.621225] Memory: 247400k available (2944k kernel code, 1168k data, 144k init) [fffff80000000000,000000001ff3a000]
|
_________________ Charly Tango
Formosa - Argentina
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
To emerge, or not to emerge: that is the question.
_________________ |
|
Back to top |
|
|
|