分类: 电脑技术
作者: admin

LINUX对硬件支持有上限么?最大多少内存?多大硬盘容量?

32位的Linux的内存最大支持到4GB,64位的Linux的最大支持内存在TB级别上。
(实际上最大支持多大的内容跟操作系统的种类无关,而是跟操作系统是几位的、还有CPU是几位的有关。)
DOS是16位的,所以DOS支持的最大内存是64MB(2的16次方字节=64MB)。
32位的Linux和Windows支持的最大内存是4GB(2的32次方字节=4GB)。
64位的Linux和Windows支持的最大内存=16EB。

至于最大硬盘容量(你应该是指最大能用多大的硬盘吧?)这个应该跟主板BIOS有关,跟操作系统无关。

最大单文件大小和最大分区大小倒是跟操作系统有点关系。
不过真正相关的倒是文件系统(File System),也就是分区的格式。
NTFS格式(windows的分区,Linux也能用):支持最大分区为2TB,最大文件为2TB;
FAT32格式(windows的分区,Linux也能用):支持最大分区为128GB,最大文件为4GB;
Ext2格式:最大分区大小为4TB,最大文件大小为1TB;
Ext3格式:最大分区大小为16TB,最大文件大小为2TB;
EXT4格式:最大分区大小为1EB,最大文件大小为16TB;
ReiserFS格式:最大分区大小为4TB,最大文件大小为1TB;

注:1EB=1024PB,1PB=1024TB,1TB=1024GB,1GB=1024MB,1MB=1024KB,1KB=1024Byte,1Byte=8bit

========================================================
网上搜索了一下。还找到最大单个文件,最大文件系统,供大家参考。

你应该清楚Linux系统/服务器能够支持的最大内存和CPU数.

我们来看一下AMD和Intel平台.

Intel X86

.最大CPU数: 32(包括逻辑CPU)
.最大内存: 64GB
.最大文件大小: 8TB
.最大文件系统大小(ext3): 16TB
.最大每个进程的虚拟地址空间: 4GB

AMD 64/ Intel EM64T

.最大CPU数: 64
.最大内存: 128GB
.最大文件大小: 8TB
.最大文件系统大小(ext3): 16TB
.最大每个进程的虚拟地址空间: N/A

请注意上面是标准的最大限制, 请不要跟Linux集群系统混淆(能扩充到1024个CPU).

你可以从Linux内核文档/usr/src/linux/Documentation获得最新的信息

========================================================

CentOS 5.2 32位 能识别的最大内存?

RT ,32位系统寻址为4G,但是我想请教一下CentOS release 5.2 (Final)最大能识别多大的内存?

[root@xxx]# uname -a
Linux nfs 2.6.18-92.el5 #1 SMP Tue Jun 10 18:49:47 EDT 2008 i686 i686 i386 GNU/Linux

-----

CPU能够寻址:2^n 字节 (n为CPU地址线数)
一般32位可寻址4G

-----

好像WIN2003也只能支持到4G(没加/PAE选择),并且只显示出3.3 G左右的内存!

-----

有特殊的内核,通过特殊的机制访问多出来的4G,
好像是xxx-PAE 后缀的内核表示支持大内存。

-----

不做任何处理只能识别最大4G,实际上3.2G

安装 PAE 可以识别到 64G的内存

-----

现在的32位机器都36位总线了,启用PAE机制可以识别64GB

-----

如果内核有支持更高内存的模块,那可以识别(现在的系统一般会打开那个功能)

-----

打开 HIGHMEM 选项,可支持到 64GB
这是我的一台双核 * 4 的服务器,32bit

# free
             total       used       free     shared    buffers     cached
Mem:       8205100    8175288      29812          0     111496    7713768
-/+ buffers/cache:     350024    7855076
Swap:      2096376          0    2096376
root@Linux1 ~
 
-----

我的也能支持8G,没编译过内核,也没作什么特别的设置,内核为 2.6.9-42.ELsmp

             total       used       free     shared    buffers     cached
Mem:       8309856    2165168    6144688          0     157848    1442192
-/+ buffers/cache:     565128    7744728
Swap:      2097096          0    2097096


-----

嗯,不开PAE也就识别3.几个G,这是X86体系的缺陷,bios还有主板上的一些寄存器的编址也要占用地址空间的,而且是从4G的高地址开始编址的,所以 可用的地址也就3个多G

-----

实际上是用不了4G的内存的,3.xG以上的一部分被系统保留了(Google上说是被PCI设备占用什么的)...
上述情况在部分机器出现,其它机子偶不清楚

-----

随便搜了一下'kernel PAE'找到文章:

操作系统在32bit x86平台上最大寻址空间只有4GB,如果要使用大于4GB的内存,就必须使用Intel的PAE(物理地址扩展)模式。在Windows NT平台实现PAE只需要对boot.ini加上/pae即可。而对于RHEL5,缺省安装模式下是不允许检测超过4GB内存,所以我们需要在内核安装完毕后再安装kernel-PAE套件。

x86 平台的硬件支持两级页表,Intel Pentium pro以上的型号均支持PAE和三级页表,使得系统最大寻址达到36位,就是64GB的内存。但是系统进程运行时使用的永远是虚拟地址,在32位字长的i386机器上,一个进程永远无法访问超出4G的字节。kernel只能通过拼凑的方式计算出大于4G的内存地址。

在Linux kernel配置项里有High Memmory Support, 如果总内存小于等于1G的选"off",大于4G的选"64G"
Note: Linux can use up to 64 Gigabytes of physical memory on x86 systems. However, the address space of 32-bit x86 processors is only 4 Gigabytes large. Thus means that, if you have a large amount of physical memory, not all of it can be "permanently mapped" by the kernel. The physical memory that's not permanently mapped is called "high memory".

还有一项Allocate 3rd-level pagetables from highmem,使用这一项可以在内存很多(大于4G)的机器上将用户空间的页表放到高位内存区,以节约宝贵的低端内存。

========================================================

请问在32位的SUSE 9下安装Oracle 10G后,Oracle最大所能使用的内存是否为4G?
为服务器配置了16G内存,现在却仅仅用了一点点,郁闷啊

刚才查了查,很多资料称32位操作系统 Oracle只支持2G内存,不知道是否属实??

也尝试在用64位的SUSE 9上安装Oracle,一切很顺利,但是不知道为什么在创建数据库的,总提示pmon进程无法启动
由于系统急,只好改回32位的SUSE 9。。。。。

-----

还是用64位吧,32位OS上的Oracle,除非采用特殊的技术,一般SGA只能达到1.7G

-----

建议使用x86-64 Linux, 如果必须使用32位Linux, 可参考:
Metalink note  260152.1        Summary About the Large SGA & Address Space on RH Linux

我摘录重点部分给你:

Configuration 5

    * RedHat Advanced Server (RHAS) 2.1 (shmfs/tmpfs)
    * RedHat Enterprise Linux (RHEL) 3.0 (shmfs/tmpfs, ramfs)
    * Configuration : VLM mode + in-memory filesystem (shmfs/tmpfs, ramfs)
    * SGA MAX Size 62GB
    * Details in Note 211424.1, Note 262004.1

Since shmfs/tmpfs, ramfs is a memory file system, its size canbe as high as the maximum allowable VM size which is 64GB. SGA MAX Size 62GB theoretic (depending on block size) Only the buffer cache part of the SGA can take advantage of the additional memory. For RHEL3/4 to use the VLM option to create a very large buffercache, you have two options (details in Note 262004.1):

    * Use shmfs/tmpfs much as you would in RHAS2.1:

    mountNote 262004.1):

        * Use shmfs/tmpfs much as you would in RHAS2.1:

        mount a shmfs with a certain size to /dev/shm, and set the correct permissions. Keep in mind that in RHEL3, shmfs allocate memory is pageable. Better to use tmpfs since there is no need to specify size.

        Mount shmfs:

                    # mount -t
    shm shmfs -o size=20g /dev/shm
                   
                    Edit /etc/fstab:
                    shmfs                /dev/shm        shm        size=20g        0        0
                           
                            ---- OR ----                       

        Mount tmpfs:

                    # mount –t tmpfs tmpfs /dev/shm
                                           
                    Edit /etc/fstab:
                    none                /dev/shm        tmpfs        defaults        0        0
           

        * Use ramfs (Ref. Note 262004.1, Note 259772.1)

        ramfs is similar to shmfs, except that pages are not pageable/swappable. This approach provides the commonly desired effect. Ramfs is created by:

                    # mount -t ramfs ramfs /dev/shm (unmount /dev/shm first).        

        The only difference here is that the ramfs pages are not backed by big pages.

        * When the shmfs/tmpfs,ramfs is available, Oracle server should know whether to use it or not. Need to use the parameter 'use_indirect_data_buffers=true' remains the same;

        If any one of DB_CACHE_SIZE, DB_xK_CACHE_SIZE are set, convert them to DB_BLOCK_BUFFERS

            * How to use the memory file system shmfs in short,for details see Note 211424.1:

                *  Mount the shmfs file system as root using command:

                        # mount -t shm shmfs -o nr_blocks=8388608 /dev/shm

                * Set the shmmax parameter to half of RAM size at most 4294967295

                        # echo 4294967295 >/proc/sys/kernel/shmmax                   

            * Set the init.ora parameter use_indirect_data_buffers=true

            * Startup oracle.

            * How to use the memory file system ramfs in short, for details see Note 262004.1:

                * Mount the shmfs file system as root using command:

                        % umount /dev/shm
                        % mount -t ramfs ramfs /dev/shm
                        % chown oracle:dba /dev/shm

                * Increase the "max locked memory" ulimit (ulimit -l)

                Add the following to /etc/security/limits.conf:

                          oracle           soft    memlock         3145728
                          oracle           hard    memlock         3145728

                (in case of ssh see details on Note 262004.1)

            * Set the init.ora parameter use_indirect_data_buffers=true

            * Startup oracle.