Skip to contentSkip to conversation

The limit of kernel memory in 64bit system

DISCUSSION J.Hwan Kim 5 participants 6 messages Nov 28, 2014 – Dec 1, 2014

lore
Share & tools
lore

J.Hwan Kim

author
#0 lore raw

Hi, everyone

As far as I know, the kernel memory limit is 1GB in 32bit system. Is it also applicable to 64bit system?
What's the limit of kernel memory in 64bit system?

Thanks in advance

Regards,

J.Hwan Kim

#1 lore raw
Quoted 5 lines · J.Hwan Kim

Hi, everyone

As far as I know, the kernel memory limit is 1GB in 32bit system. Is it also applicable to 64bit system?
What's the limit of kernel memory in 64bit system?

There is no limit :)

What do you really want to know this for?

greg k-h

#2 lore raw

J.Hwan,
There is a limit as 64 bit can only support 16 extabytes. Greg is right in that there is no real limit on modern machines because of this. However from my knowledge, system ram is split into a 3 to 1 ratio, where 75 percent is for user space and the only quarter is for the kernel's memory. So on my system with 8 GB of ram, the kernel can use up to 25 percent or 2 GB of ram.
Hope this answers your question,
Nick

Quoted 18 lines · Greg KH
Quoted 5 lines · J.Hwan Kim

Hi, everyone

As far as I know, the kernel memory limit is 1GB in 32bit system. Is it also applicable to 64bit system?
What's the limit of kernel memory in 64bit system?

There is no limit :)

What do you really want to know this for?

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

#3 lore raw

Incorrect. The 64 bit machine theoretically supports 2 ^ 64 bytes virtual memory space but on x86 only 48 out of 64 address buses are used. So we cannot assume the upper limit of physical space.on different platforms. And Nick you're confusing with the physical and virtual memory. The usage of memory for kernel space is not determined by the ratio. It's defined by mapping strategy. You first need to know why this 3 to 1 was used. It's because we cannot map all the physical pages onto the corresponding virtual address since we need to spare some linear space for user program. But on 64 bits platform we have plenty virtual address for the programmer as the physical memory is much much smaller than it. On x86_64 we divide kernel/user space by setting all the first 16 bits with 0 or 1 as the user or kernel space respectfully. So how large would the kernel space be if we could use 48-bit linear space?

Quoted 35 lines · nick

J.Hwan,
There is a limit as 64 bit can only support 16 extabytes. Greg is right in that there is no real limit
on modern machines because of this. However from my knowledge, system ram is split into a 3 to 1 ratio,
where 75 percent is for user space and the only quarter is for the kernel's memory. So on my system with
8 GB of ram, the kernel can use up to 25 percent or 2 GB of ram. Hope this answers your question,
Nick

Quoted 9 lines · Greg KH
Quoted 5 lines · J.Hwan Kim

Hi, everyone

As far as I know, the kernel memory limit is 1GB in 32bit system. Is it also applicable to 64bit system?
What's the limit of kernel memory in 64bit system?

There is no limit :)

Quoted 9 lines

What do you really want to know this for?

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Signature · 5 lines
Best regards
Chen, Yiqun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20141129/45e0da15/attachment.html 
#4 lore raw

Sorry Yiqun,
I was thinking of virtual memory so you are correct. I also haven't looked into the kernel memory subsystem(s) in a while so I may be a little behind in my knownledge of them.
Regards Nick

Quoted 54 lines · Yiqun Chen

Incorrect. The 64 bit machine theoretically supports 2 ^ 64 bytes virtual memory space but on x86 only 48 out of 64 address buses are used. So we cannot assume the upper limit of physical space.on different platforms. And Nick you're confusing with the physical and virtual memory. The usage of memory for kernel space is not determined by the ratio. It's defined by mapping strategy. You first need to know why this 3 to 1 was used. It's because we cannot map all the physical pages onto the corresponding virtual address since we need to spare some linear space for user program. But on 64 bits platform we have plenty virtual address for the programmer as the physical memory is much much smaller than it. On x86_64 we divide kernel/user space by setting all the first 16 bits with 0 or 1 as the user or kernel space respectfully. So how large would the kernel space be if we could use 48-bit linear space?

Quoted 35 lines · nick

J.Hwan,
There is a limit as 64 bit can only support 16 extabytes. Greg is right in that there is no real limit
on modern machines because of this. However from my knowledge, system ram is split into a 3 to 1 ratio,
where 75 percent is for user space and the only quarter is for the kernel's memory. So on my system with
8 GB of ram, the kernel can use up to 25 percent or 2 GB of ram. Hope this answers your question,
Nick

Quoted 9 lines · Greg KH
Quoted 5 lines · J.Hwan Kim

Hi, everyone

As far as I know, the kernel memory limit is 1GB in 32bit system. Is it also applicable to 64bit system?
What's the limit of kernel memory in 64bit system?

There is no limit :)

Quoted 9 lines

What do you really want to know this for?

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies at kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

#5 lore raw
Quoted 4 lines · nick

Sorry Yiqun,
I was thinking of virtual memory so you are correct. I also haven't looked into the kernel memory subsystem(s) in a while so I may be a little behind in my knownledge of them.

2^1
The amount of memory that can be handled by a processor is available via /proc/cpuinfo:

processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 60
model name : Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz
stepping : 3
microcode : 0x16
cpu MHz : 3400.132
cache size : 8192 KB
clflush size : 64
cache_alignment : 64
address sizes : 39 bits physical, 48 bits virtual

so this processor support a physical memory space of 2^39 = 512GB and a virtual address space of 256 TB.

A 64 bit kernel can support what the processor supports.