Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel memory allocation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc
View previous topic :: View next topic  
Author Message
McTango
n00b
n00b


Joined: 11 Dec 2004
Posts: 66
Location: Formosa - Argentina

PostPosted: Thu Jun 18, 2009 3:02 pm    Post subject: Kernel memory allocation Reply with quote

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. :oops:)
_________________
Charly Tango
Formosa - Argentina
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
To emerge, or not to emerge: that is the question.
_________________
Back to top
View user's profile Send private message
eccerr0r
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 4015
Location: USA

PostPosted: Thu Jun 18, 2009 8:59 pm    Post subject: Reply with quote

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@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed to be advocating?
Back to top
View user's profile Send private message
McTango
n00b
n00b


Joined: 11 Dec 2004
Posts: 66
Location: Formosa - Argentina

PostPosted: Fri Jun 19, 2009 11:14 am    Post subject: Reply with quote

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
View user's profile Send private message
i92guboj
Moderator
Moderator


Joined: 30 Nov 2004
Posts: 10089
Location: Córdoba (Spain)

PostPosted: Fri Jun 19, 2009 12:20 pm    Post subject: Reply with quote

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).
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
x22
Apprentice
Apprentice


Joined: 24 Apr 2006
Posts: 208

PostPosted: Mon Jun 22, 2009 10:03 am    Post subject: Reply with quote

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
View user's profile Send private message
McTango
n00b
n00b


Joined: 11 Dec 2004
Posts: 66
Location: Formosa - Argentina

PostPosted: Mon Jun 22, 2009 2:15 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Sparc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum