ºìÁªLinuxÃÅ»§
Linux°ïÖú

LINUXϵͳÐÔÄܵ÷г

·¢²¼Ê±¼ä:2006-02-15 09:18:01À´Ô´:ºìÁª×÷Õß:Ììʹ
±¾ÎÄ´Ó´ÅÅÌ£¬Îļþ¼°Îļþϵͳ£¬ÄÚ´æºÍ±àÒëµÈ·½ÃæÏêϸµÄ½²ÊöÁËÈçºÎ¶ÔLinuxϵͳÐÔÄܽøÐе÷г¡£²»¹ÜÊÇLinux·þÎñÆ÷»¹ÊÇ¿Í»§»ú»òÕßÓû§µ¥»ú£¬°´ÕÕ±¾ÎÄÌṩµÄµ÷г·½·¨£¬¾ù¿É²»Í¬³Ì¶ÈµØ¸ÄÉÆLinuxϵͳµÄÐÔÄÜ¡£
1£® ÒýÑÔ

ʵ¼ùÖ¤Ã÷LinuxÊǸßÐÔÄÜ¡¢Îȶ¨¿É¿¿¶øÓÖÏ൱Áé»îµÄ²Ù×÷ϵͳ£¬½üÄêÀ´£¬ÊÀ½çÉÏÐí¶à´óÈí¼þ¹«Ë¾·×·×ÍƳö¸÷ÖÖLinux·þÎñÆ÷ϵͳ¼°LinuxϵÄÓ¦ÓÃÈí¼þ¡£Ä¿Ç°£¬LinuxÒÑ¿ÉÒÔÓë¸÷ÖÖ´«Í³µÄÉÌÒµ²Ù×÷ϵͳ·ÖÍ¥¿¹Àñ£¬ÔÚ·þÎñÆ÷Êг¡£¬Õ¼¾ÝÁËÏ൱´óµÄ·Ý¶î¡£LinuxµÄ·þÎñÆ÷ϵͳ¶àÖÖ¶àÑù£¬¿ÉÓÃ×÷web·þÎñÆ÷£¬Óʼþ·þÎñÆ÷£¬ftp·þÎñÆ÷£¬Îļþ·þÎñÆ÷ÒÔ¼°Êý¾Ý¿â·þÎñÆ÷µÈµÈ¡£Õë¶Ô²»Í¬µÄϵͳÒÔ¼°¾ßÌåµÄÓ¦Óû·¾³£¬¿ÉÒÔ¶ÔLinuxµÄÐÔÄܽøÐÐÏàÓ¦µÄµ÷г¡£ÏÂÃæ·Ö±ð´Ó´ÅÅ̵÷г£¬Îļþϵͳ£¬ÄÚ´æ¹ÜÀíÒÔ¼°±àÒëÓÅ»¯µÈ·½ÃæÀ´ÂÛÊöLinuxϵͳµÄÓÅ»¯µ÷г²ßÂÔ¡£

2£®´ÅÅ̵÷г

2.1 ÓÅ»¯µÄ·ÖÇø

ÔÚ°²×°Linuxϵͳ֮³õ£¬¾ÍÓ¦¸Ã¿¼ÂÇÔõÑùʹlinuxϵͳµÃµ½×îºÃµÄÐÔÄÜ¡£ÔÚLinuxϵͳÖУ¬ÎÒÃÇ¿ÉÒÔ×ÔÓɵØ×éÖ¯´ÅÅÌ·ÖÇø¡£Ò»¸öÓÅ»¯µÄ·ÖÇø²ßÂÔ£¬¿ÉÒԺܺõظĽøLinuxϵͳµÄÐÔÄÜ£¬¼õÉÙ´ÅÅÌËéƬ£¬Ìá¸ß´ÅÅÌI/OÄÜÁ¦¡£

¸ù¾Ý´ÅÅ̵ÄÌص㣬ÎÒÃÇÖªµÀÔ½ÊÇ¿¿´ÅÅÌÍⲿµÄÖùÃ棬ÐýתԽ¿ì£¬¶øÇÒÿ´ÎÐýתʱ£¬´ÅÅ̶Áдͷ¿ÉÒÔ¸²¸Ç½Ï¶àµÄÇøÓò£¬Ò²¾ÍÒâζ×Å¿¿ÍⲿµÄÖùÃæ¿ÉÒԵõ½½ÏºÃµÄÐÔÄÜ¡£ËùÒÔÔÚ·ÖÇøʱ£¬ÎÒÃÇÓ¦¸Ã¿¼Âǽ«·ÃÎÊƵÂʸߵģ¬¶ÔϵͳÐÔÄÜÓ°ÏìÏà¶Ô½Ï´óµÄ·ÖÇøÖÃÓÚ´ÅÅ̵Ŀ¿Íⲿ·Ö¡£Í¬Ê±£¬ÎªÁ˼õÉÙ´ÅÅÌËéƬ£¬Ó¦½«ÄÚÈݾ­³£¸Ä±äµÄĿ¼·ÅÔÚµ¥¶ÀµÄ·ÖÇø¡£´Ó·½±ã±¸·ÝÊý¾ÝµÄ½Ç¶È¿¼ÂÇ£¬ÒòΪºÜ¶à±¸·Ý¹¤¾ß¶ÔÕû¸ö·ÖÇø½øÐб¸·ÝµÄЧÂÊÒª¸ß£¬ËùÒÔÎÒÃÇÓ¦½«LinuxϵͳµÄ¼¸¸öÖ÷ÒªµÄĿ¼×÷Ϊµ¥¶ÀµÄÎļþϵͳ£¬ÎªËüÃǸ÷×Ô·ÖÅäÒ»¸öÇø¡£ÍƼöµÄ·ÖÇø²ßÂÔÈçͼһ£º





ÔÚÉÏͼÖÐ,´ÅÅÌ»¹ÓÐÒ»²¿·Öδ·ÖÇøµÄ¿Õ¼ä,Ϊʲô²»ÔÚ°²×°ÏµÍ³Ê±,½«Õû¸ö´ÅÅÌ·ÖÇøÄØ?ÏÖÔÚµÄÓ²ÅÌ¿Õ¼ä±È½Ï´ó,¶øÔÚ°²×°ÏµÍ³Ê±,Ò²ÐíÄãËù°²×°µÄÎļþ¼ÓÉÏÒÔºóÔö³¤ËùÐèÒªµÄ¿Õ¼äÓò»µ½Õû¸ö´ÅÅÌ´æ´¢¿Õ¼ä¡£±£ÁôÒ»²¿·Öδ·ÖÇø¿Õ¼ä£¬µ±ÒÔºóÓÐеÄÐèҪʱ£¬¾Í¿ÉÒÔÓÃfdiskÖØн«Ö®·ÖÇø¡£ÔÚ·ÖÇøʱ£¬ÐèҪעÒâµÄÊÇ£¬¸ù¾Ýϵͳ½«À´ÔËÐеÄÐèÒª»ò¹ýÈ¥µÄ¾­ÑéÀ´¹À¼Æ¸÷¸ö·ÖÇøµÄ´óС£¬ÒÔÃ⽫À´¿Õ¼ä²»¹»¡£

Èç¹ûÄãµÄϵͳÓжà¿éÓ²ÅÌ£¬¿ÉÒÔ¿¼ÂÇʹÓöà¸ö½»»»·ÖÇø¡£Ã¿¸ö´ÅÅÌÉÏ»®·ÖÒ»¸ö½»»»·ÖÇø¡£Í¨¹ýÔÚ/etc/fstabÎļþÖÐÉèÖÃpri Ñ¡Ï¿Éʹ¶à¸ö½»»»·ÖÇø¾ßÓÐͬÑùµÄÓÅÏȼ¶¡£Linuxϵͳ¼´¿É²¢ÐеØʹÓÃËüÃÇ¡£ÕâÑù¼´¿ÉÌá¸ß½»»»·ÖÇøµÄÐÔÄÜ¡£


/dev/hda5 swap swap defaults,pri=5 0 0
/dev/hdc5 swap swap defaults,pri=5 0 0




ͼ£¨¶þ£©¶à¸ö½»»»·ÖÇøÉèÖÃÏàͬµÄÓÅÏȼ¶
µ±È»£¬Èç¹ûÄãµÄϵͳÄÚ´æ×ã¹»´ó£¬¶øÄãµÄϵͳÓÖÔ¶Ô¶Óò»ÁËÄÇô¶àµÄÄڴ棬ÄÇÒ²¾ÍÓò»µ½Ê²Ã´Ðé´æÁË¡£·ÖÇøʱÄã¾Í¿ÉÒÔ¿¼ÂÇÈ¥µô½»»»·ÖÇø¡£²»¹ý×÷Ϊһ¸öLinux·þÎñÆ÷£¬¼´Ê¹ÄãµÄÄÚ´æ×ã¹»´ó£¬»¹ÊÇÓ¦¸ÃÉèÖý»»»·ÖÇø¡£

2.2 ʹÓÃhdparm¸ÄÉÆLinuxϵͳÐÔÄÜ

Èç¹ûÄãµÄLinuxϵͳÔËÐÐÓÚIDEÓ²ÅÌ£¬¿ÉÒÔʹÓÃhdparm¹¤¾ßÀ´Ìá¸ß´ÅÅÌI/OµÄÐÔÄÜ¡£²»¹ýʹÓÃhdparmҪСÐÄ£¬ÒòΪ¿ÉÄÜÆÆ»µÓ²ÅÌÉϵÄÊý¾Ý¡£ËùÒÔÔÚʹÓÃhdparm֮ǰ£¬×ÐϸÔĶÁÄãµÄÓ²ÅÌÊֲᡣ¸ù¾ÝÄã¾ßÌåµÄÓ²Å̹æ¸ñÀ´Ê¹ÓÃÏàÓ¦µÄhdparm¿ª¹Ø²ÎÊý¡£¶ÔÒ»¿éUltraATA/66 EIDE Ó²ÅÌ£¬Æä¿ØÖÆоƬ֧³Ö¶à PIO ģʽºÍDMA£¬ÎÒÃÇʹÓÃÒÔÏÂÃüÁîÀ´µ÷г´ÅÅÌÐÔÄÜ£º

# /sbin/hdparm -x66 -d1 -u1 -m16 -c3 /dev/hda

Ñ¡Ïî˵Ã÷£º

¢Ù c3 £º¾ÍÊÇ°ÑÓ²Å̵Ä16λ¸ñʽת»»Îª32λģʽ£¨32-bit mode w/sync£©¡£¿ØÖÆÊý¾ÝÈçºÎ´Ópci×ÜÏß´«µÝµ½¿ØÖÆÆ÷¡£
¢Ú m16 £º¸Ä±äÓ²Å̵Ķà·ÉÈÇøµÄ¶Á¹¦ÄÜ£¬-m16¿ÉÒÔʹµÃÓ²ÅÌÔÚÒ»´Îi/oÖжÏÖжÁÈë16¸öÉÈÇøµÄÊý¾Ý£¨¾Ý¾ßÌåÓ²Å̶ø¶¨£©¡£
¢Û d1£º´ò¿ªDMAģʽ¡£
¢Ü x66 £ºÔÚÖ§³ÖUDMA-capableµÄÓ²ÅÌÖУ¬Õâ¸ö²ÎÊý¿ÉÒÔÖ§³ÖË«DMAͨµÀµÄÊý¾Ý´«Êäģʽ¡£
¢Ý u1 £ºLinuxÔÚ´¦Àí´ÅÅÌÖжÏʱ£¬¿ÉÒÔunmaskÆäËûµÄÖжϻòÕßÏìÓ¦ÆäËûÖжÏÏà¹ØµÄÈÎÎñ¡£


²é¿´ÒÔÉϵĸü¸ÄÇé¿ö¿ÉÒÔʹÓÃÃüÁ

# /sbin/hdparm /dev/hda

²âÊÔ´ÅÅÌI/OÐÔÄÜ¿ÉÒÔʹÓÃÃüÁ

# /sbin/hdparm -tT /dev/hda

Èç¹û´ÅÅ̵ÄÐÔÄÜÓиĽøµÄ»°£¬¿ÉÒÔʹÓÃÒÔÏÂÃüÁîÀ´±£´æÉèÖãº

# /sbin/hdparm -k1 /dev/hda

2.3 LinuxÏÂʹÓÃÈíRAID

RAID£¨´ÅÅÌÈßÓàÕóÁУ©ÊÇͨ¹ý½«Êý¾Ý·Ö²¼ÔÚ¶à¸ö´ÅÅÌÉÏÀ´ÔöÇ¿´ÅÅÌÐÔÄܺͿɿ¿ÐԵļ¼Êõ¡£Èç¹ûÄãµÄϵͳûÓÐÓ²¼þRAID¿ØÖÆÆ÷µÄ»°£¬ÔÚLinuxÏ¿ÉÒÔͨ¹ýÈí¼þÀ´ÊµÏÖRAID¡£RAIDµÄÓкܶàµÄ¼¶±ð£¬²»Í¬µÄ¼¶±ð¶ÔÓ²¼þÓв»Í¬µÄÒªÇó£¬ÏàÓ¦Ò²»áµÃµ½²»Í¬µÄÐÔÄܺͿɿ¿ÐÔ¡£RAID0ΪÊý¾Ý·Ö¸î£¬Êý¾Ý¿é±»½»Ìæдµ½´ÅÅÌ£¬¿ÉÒԵõ½×îºÃµÄ¶ÁдÐÔÄÜ£¬µ«ÊDz»ÌṩÊý¾ÝÈßÓà¡£RAID1Ϊ´ÅÅ̾µÏñ£¬Ð´µ½´ÅÅÌ1ÖеÄÒ»ÇÐҲдµ½´ÅÅÌ2ÖУ¬´ÓÈκÎÒ»¸ö´ÅÅ̶¼¿ÉÒÔ¶ÁÈ¡¡£RAID3³ýÁËÊý¾Ý·Ö¸îÖ®Í⣬»¹Ö¸¶¨Ò»¸ö´ÅÅÌÇý¶¯Æ÷À´´æ´¢ÆæżÐÅÏ¢¡£

ÔÚLINUXÏÂͨ¹ýÈí¼þÀ´ÊµÏÖRAID£¬ ÐèÒªLINUXµÄÄÚºËÖ§³Ö£¬¿ÉÒÔͨ¹ý±àÒëÐÂÄÚºËÀ´Ìí¼Ó¶ÔRAIDµÄÖ§³Ö¡£È»ºó»¹Ðè±àÒë²¢°²×° raidtools Èí¼þ°ü¡£raidtools ÊÇ¿ÉÒÔ³õʼ»¯¡¢Æô¶¯¡¢Í£Ö¹¼°¿ØÖÆ RAID ÕóÁеÄÓû§¼¶¹¤¾ß¡£ÏÂÃæÊÇÎÒÃÇÓÃÁ½¿éIDEÓ²ÅÌÔÚLINUXÄÚºË2.4ÉÏʵÏÖRAID0µÄ·½·¨¡£

ÉèÖ÷ÖÇø ʹÓÃRAID0ÖÁÉÙÐèÒªÁ½¸ö·ÖÇø£¬ËüÃÇλÓÚ²»Í¬µÄ´ÅÅÌ¡£×îºÃ×öRAID0µÄÁ½¸ö·ÖÇøÓÐÏàͬµÄ´óС¡£´´½¨·ÖÇøʱ£¬½«·ÖÇøÀàÐÍÖ¸¶¨Îª "FD"¡£ÒÔʹ Linux ÄÚºËÄܽ«ËüÃÇʶ±ðΪ RAID ·ÖÇø£¬ÕâÑù£¬ÕâЩ·ÖÇø¾Í¿ÉÔÚÿ´ÎÒýµ¼Ê±×Ô¶¯±»¼ì²â²¢Æô¶¯¡£Èç¹ûÄúûÓÐÒÔÕâÖÖ·½Ê½±ê¼Ç RAID ·ÖÇø£¬ÔòÔÚÿ´ÎÒýµ¼Ö®ºó£¬±ØÐëÊ×ÏÈÊäÈë "raidstart --all" ²ÅÄܹÒÔØ RAID ÕóÁС£ÎÒÃÇ×ö³ÉRAID0µÄÁ½¸ö·ÖÇøΪhda5ºÍhdc5¡£

±à¼­/etc/raidtabÎļþ ´´½¨/etc/raidtabÎļþÒÔÃèÊöRAIDÕóÁеÄÅäÖÃÐÅÏ¢¡£Linux ÄÚºËʹÓÃÕâЩÐÅÏ¢ÔÚÒýµ¼Ê±×Ô¶¯¼ì²â²¢Æô¶¯ RAID ÕóÁУ¬Òò´Ë±ØÐë¶Ô´´½¨µÄÿ¸ö RAID ÕóÁнøÐÐÕâÖÖÅäÖ᣽«·ÖÇøhda5ºÍhdc5×é³Émd0 RAID0ÕóÁеÄÅäÖÃÎļþÈçÏ£º


ÒýÓÃ:
raiddev /dev/md0
raid-level 0
nr-raid-disks 2
persistent-superblock 1
chunk-size 32
device /dev/hda5
raid-disk 0
device /dev/hdc5
raid-disk 1






ͼ£¨Èý£© raidtabÎļþ
ÔÚraidtabÎļþÖУ¬"raiddev" ÌõÄ¿Ö¸Ã÷Òª´´½¨µÄ RAID ÕóÁУ»"nr-raid-disks" Ö¸¶¨ÕóÁÐÖеĴÅÅÌÊýÄ¿£»"persistent-superblock" ÉèÖÃΪ 1£¬¸æËß raid ¹¤¾ßºÎʱ´´½¨¸Ã¾í£»"chunk-size" ÒÔK×Ö½ÚÖ¸¶¨ RAID0 ʹÓõĿé´óС£»×îºó£¬ÒªÖ¸¶¨µÄÊÇ×é³É¸ÃÕóÁеÄÉ豸¼´·ÖÇø¡£

mkraid ºÍ´´½¨Îļþϵͳ ʹÓÃÃüÁî"# mkraid /dev/md0" ÃüÁî³õʼ»¯/dev/md0·ÖÇø£¬Í¬Ê±½«Æô¶¯md0 RAID0ÕóÁС£½ÓÏÂÀ´£¬¼´¿ÉÔÚmd0ÉÏ´´½¨ÄãÏëÒªµÃÎļþϵͳ¡£ÎÒÃÇÔÚLinux·þÎñÆ÷ÉÏʹÓõÄÊÇReiserfsÈÕÖ¾Îļþϵͳ£¬´´½¨µÄÃüÁîΪ"# mkreiserfs /dev/md0"¡£

ÕâÑù£¬¾Í¿ÉÒÔÏñÆäËüÎļþϵͳÄÇÑùÀ´¼ÓÔØд´½¨µÄ»ùÓÚRAID0µÄÎļþϵͳÁË¡£

2.4 ʹÓÃelvtuneµ÷г´ÅÅÌI/O

ÔÚLinuxÄÚºË2.4ÒÔºóµÄ°æ±¾ÖУ¬¿ÉÒÔͨ¹ý´ÅÅÌI/OµÄµ÷¶È²Ù×÷£¬À´¿ØÖÆ´ÅÅÌI/OµÄÏìӦʱ¼äºÍÍÌÍÂÁ¿¡£Í¨¹ýµ÷ÕûI/OÇëÇóÔÚ¶ÓÁÐÖеÄ×î´óµÈ´ýʱ¼ä£¬¿ÉÒÔÔÚÏìӦʱ¼äºÍÍÌÍÂÁ¿Ö®¼äµ÷г¡£Èç¹ûÒªÇó½ÏÉÙµÄÏìӦʱ¼ä£¬ÄÇôÍÌÍÂÁ¿½«½µµÍ£¬·´Ö®£¬½Ï³¤µÄÏìӦʱ¼äÔò¿ÉÒԵõ½½Ï´óµÄÍÌÍÂÁ¿¡£¿ÉÒÔʹÓù¤¾ß"/sbin/elvtune"À´¸Ä±ä×î´óµÄÏìӦʱ¼äÖµ¡£Ê¹Ó÷½·¨ÈçÏ£º

²é¿´µ±Ç°µÄÉèÖÃ

# /sbin/elvtune /dev/hda1

Ð޸ĵ±Ç°µÄÅäÖÃ

# /sbin/elvtune -r 2000 -w 4000 /dev/hda1

ÆäÖÐ-r²ÎÊýÕë¶Ô¶Á²Ù×÷£¬-w²ÎÊýÕë¶Ôд²Ù×÷.

¿ÉÒÔͨ¹ýÃüÁî"iostat -d -x /dev/hda1"µÃµ½µÄƽ¾ùÐÅÏ¢£¨°üÀ¨Æ½¾ùÇëÇó´óСºÍƽ¾ù¶ÓÁг¤¶È£©À´¼àÊÓÒÔÉÏI/OÅäÖõÄЧ¹û£¬²¢µ÷ÕûÅäÖã¬ÒԵõ½×î¼ÑµÄÐÔÄÜ¡£Ò»°ãÀ´½²£¬¶ÔÓÚ¶ÁдƵ·±£¬µ«²Ù×÷µÄÊý¾ÝÁ¿½ÏÉÙµÄLinux·þÎñÆ÷£¬ÇÒ¶ÔʵʱÐÔÒªÇó½Ï¸ß£¬ÄÇô¿ÉÒÔ½«²ÎÊýµ÷С¡£·´Ö®Èç¹û¶ÔÓÚ¶Áд²»Æµ·±£¬µ«ÒªÇó¾ßÓнϴóµÄÍÌÍÂÁ¿µÄLinux·þÎñÆ÷£¬¿ÉÒÔ½«²ÎÊýµ÷´ó£¬ÒÔ»ñµÃ½Ï´óµÄÍÌÍÂÁ¿¡£

3£® Îļþ¼°Îļþϵͳµ÷г

3.1 ¿é´óС

´´½¨Îļþϵͳʱ£¬¿ÉÒÔÖ¸¶¨¿éµÄ´óС¡£Èç¹û½«À´ÔÚÄãµÄÎļþϵͳÖÐÊÇһЩ±È½Ï´óµÄÎļþµÄ»°£¬Ê¹ÓýϴóµÄ¿é´óС½«µÃµ½½ÏºÃµÄÐÔÄÜ¡£½«ext2ÎļþϵͳµÄ¿é´óСµ÷ÕûΪ4096byte¶ø²»ÊÇȱʡµÄ1024byte£¬¿ÉÒÔ¼õÉÙÎļþËéƬ£¬¼Ó¿ìfsckɨÃèµÄËٶȺÍÎļþɾ³ýÒÔ¼°¶Á²Ù×÷µÄËٶȡ£ÁíÍ⣬ÔÚext2µÄÎļþϵͳÖУ¬Îª¸ùĿ¼±£ÁôÁË5%µÄ¿Õ¼ä£¬¶ÔÒ»¸ö´óµÄÎļþϵͳ£¬³ý·ÇÓÃ×÷ÈÕÖ¾Îļþ£¬5%µÄ±ÈÀýÓÐЩ¹ý¶à¡£¿ÉÒÔʹÓÃÃüÁî"# mke2fs -b 4096 -m 1 /dev/hda6"½«Ëü¸ÄΪ1%²¢ÒÔ¿é´óС4096byte´´½¨Îļþϵͳ¡£

ʹÓöà´óµÄ¿é´óС£¬ÐèÒª¸ù¾ÝÄãµÄϵͳ×ۺϿ¼ÂÇ£¬Èç¹ûϵͳÓÃ×÷Óʼþ»òÕßÐÂÎÅ·þÎñÆ÷£¬Ê¹ÓýϴóµÄ¿é´óС£¬ËäÈ»ÐÔÄÜÓÐËùÌá¸ß£¬µ«»áÔì³É´ÅÅÌ¿Õ¼ä½Ï´óµÄÀË·Ñ¡£±ÈÈçÎļþϵͳÖеÄÎļþƽ¾ù´óСΪ2145byte£¬Èç¹ûʹÓÃ4096byteµÄ¿é´óС£¬Æ½¾ùÿһ¸öÎļþ¾Í»áÀË·Ñ1951byte¿Õ¼ä¡£Èç¹ûʹÓÃ1024byteµÄ¿é´óС£¬Æ½¾ùÿһ¸öÎļþ»áÀË·Ñ927byte¿Õ¼ä¡£ÔÚÐÔÄܺʹÅÅ̵Ĵú¼ÛÉÏÈçºÎƽºâ£¬Òª¿´¾ßÌåÓ¦ÓõÄÐèÒª¡£

3.2 ²»Ê¹ÓÃatimeÊôÐÔ

µ±Îļþ±»´´½¨£¬Ð޸ĺͷÃÎÊʱ£¬Linuxϵͳ»á¼Ç¼ÕâЩʱ¼äÐÅÏ¢¡£¼Ç¼Îļþ×î½üÒ»´Î±»¶ÁÈ¡µÄʱ¼äÐÅÏ¢£¬µ±ÏµÍ³µÄ¶ÁÎļþ²Ù×÷Ƶ·±Ê±£¬½«ÊÇÒ»±Ê²»ÉٵĿªÏú¡£ËùÒÔ£¬ÎªÁËÌá¸ßϵͳµÄÐÔÄÜ£¬ÎÒÃÇ¿ÉÒÔÔÚ¶ÁÈ¡Îļþʱ²»ÐÞ¸ÄÎļþµÄatimeÊôÐÔ¡£¿ÉÒÔͨ¹ýÔÚ¼ÓÔØÎļþϵͳʱʹÓÃnotimeÑ¡ÏîÀ´×öµ½ÕâÒ»µã¡£µ±ÒÔnoatimeÑ¡Ïî¼ÓÔØ£¨mount£©Îļþϵͳʱ£¬¶ÔÎļþµÄ¶ÁÈ¡²»»á¸üÐÂÎļþÊôÐÔÖеÄatimeÐÅÏ¢¡£ÉèÖÃnoatimeµÄÖØÒªÐÔÊÇÏû³ýÁËÎļþϵͳ¶ÔÎļþµÄд²Ù×÷£¬ÎļþÖ»ÊǼòµ¥µØ±»ÏµÍ³¶ÁÈ¡¡£ÓÉÓÚд²Ù×÷Ïà¶Ô¶ÁÀ´ËµÒª¸üÏûºÄϵͳ×ÊÔ´£¬ËùÒÔÕâÑùÉèÖÿÉÒÔÃ÷ÏÔÌá¸ß·þÎñÆ÷µÄÐÔÄÜ¡£×¢ÒâwtimeÐÅÏ¢ÈÔÈ»ÓÐЧ£¬ÈκÎʱºòÎļþ±»Ð´£¬¸ÃÐÅÏ¢ÈÔ±»¸üС£

±ÈÈçÔÚÄãµÄϵͳÖУ¬ÒªÎª/homeÎļþϵͳÉèÖÃnotimeÑ¡Ï¿ÉÒÔÐÞ¸Ä/etc/fstabÎļþÏàÓ¦µÄÐÐÈçÏ£º


LABEL=/home /home ext2 noatime 1 2




Ҫʹ¸ÃÉèÖÃÁ¢¼´ÉúЧ£¬¿ÉÔËÐÐÃüÁî"#mount -oremount /home"¡£ÕâÑùÒÔºóϵͳ¶ÁÈ¡/homeϵÄÎÄ ¼þʱ½«²»»áÔÙÐÞ¸ÄatimeÊôÐÔ¡£

3.3 µ÷Õû»º³åÇøˢвÎÊý

LinuxÄÚºËÖУ¬°üº¬ÁËһЩ¶ÔÓÚϵͳÔËÐÐ̬µÄ¿ÉÉèÖòÎÊý¡£»º³åˢеIJÎÊý¿ÉÒÔͨ¹ýµ÷Õû /proc/sys/vm/bdflushÎļþÀ´Íê³É£¬Õâ¸öÎļþµÄ¸ñʽÊÇÕâÑùµÄ£º

# cat /proc/sys/vm/bdflush
30 64 64 256 500 3000 60 0 0

ÿһÀ¸ÊÇÒ»¸ö²ÎÊý£¬ÆäÖÐ×îÖØÒªµÄÊÇÇ°Ã漸¸ö²ÎÊý¡£µÚÒ»¸öÊý×ÖÊÇÔÚ"dirty"»º³åÇø´ïµ½¶àÉÙµÄʱºòÇ¿ÖÆ»½ÐÑbdflush½ø³ÌË¢ÐÂÓ²ÅÌ£¬µÚ¶þ¸öÊý×ÖÊÇÿ´ÎÈÃbdflush½ø³ÌˢжàÉÙ¸ödirty¿é¡£Ëùνdirty¿éÊDZØÐëдµ½´ÅÅÌÖеĻº´æ¿é¡£½ÓÏÂÀ´µÄ²ÎÊýÊÇÿ´ÎÔÊÐíbd flush½«¶àÉÙ¸öÄÚ´æ¿éÅÅÈë¿ÕÏеĻº³å¿éÁÐ±í¡£ ÒÔÉÏֵΪRedHat Linux 7.1ÖеÄȱʡֵ¡£ÈçºÎÐÞ¸ÄËüÃÇÄØ£¿¶Ô²»Í¬µÄϵͳÓÐÒÔÏÂÁ½ÖÖ·½·¨

£¨1£©# echo "100 128 128 512 5000 3000 60 0 0">/proc/sys/vm/bdflush ²¢½«ÕâÌõÃüÁî¼Óµ½/etc/rc.d/rc.localÎļþÖÐÈ¥¡£
£¨2£©ÔÚ/etc/sysctl.conf ÎļþÖмÓÈëÈçÏÂÐÐ: vm.bdflush = 100 128 128 512 5000 3000 60 0 0
ÒÔÉϵÄÉèÖüӴóÁË»º³åÇø´óС£¬½µµÍÁËbdflush±»Æô¶¯µÄƵ¶È£¬Í¬Ê±Ò²Ôö¼ÓÁËÍòһϵͳ±ÀÀ£¶ªÊ§Êý¾ÝµÄΣÏÕÐÔ¡£VFSµÄ»º³åË¢ÐÂÊÇLinuxÎļþϵͳ¸ßЧµÄÖØÒªÔ­ÒòÖ®Ò»£¬Èç¹ûÐÔÄܶÔÄãÕæµÄºÜÖØÒª£¬Ó¦¸Ã¿¼Âǵ÷ÕûÕâ¸ö²ÎÊý¡£

3.4 µ÷ÕûÎļþ¾ä±úÊýºÍi-½ÚµãÊý

ÔÚÒ»¸ö´óÐ͵ÄÍøÕ¾·þÎñÆ÷ÆäÖУ¬¿ÉÄÜLinuxĬÈϵÄͬʱ¿É´ò¿ª×î´óÎļþÊý²»ÄÜÂú×ãϵͳÐèÒª£¬ÎÒÃÇ¿ÉÒÔͨ¹ýµ÷ÕûÎļþ¾ä±úÊýºÍi-½ÚµãÊýÀ´Ôö¼ÓϵͳµÄȱʡµÄÏÞÖÆ¡£²»Í¬µÄLinuxÄں˰汾Óв»Í¬µÄµ÷Õû·½·¨¡£

ÔÚLinuxÄÚºË2.2.xÖпÉÒÔÓÃÈçÏÂÃüÁîÐ޸ģº

# echo '8192' > /proc/sys/fs/file-max
# echo '32768' > /proc/sys/fs/inode-max

²¢½«ÒÔÉÏÃüÁî¼Óµ½/etc/rc.c/rc.localÎļþÖУ¬ÒÔʹϵͳÿ´ÎÖØÐÂÆô¶¯Ê±ÅäÖÃÒÔÉÏÖµ¡£

ÔÚLinuxÄÚºË2.4.xÖÐÐèÒªÐÞ¸ÄÔ´´úÂ룬ȻºóÖØбàÒëÄں˲ÅÉúЧ¡£±à¼­LinuxÄÚºËÔ´´úÂëÖÐµÄ include/linux/fs.hÎļþ£¬½« NR_FILE ÓÉ8192¸ÄΪ 65536£¬½«NR_RESERVED_FILES ÓÉ10 ¸ÄΪ 128¡£±à¼­fs/inode.c Îļþ½« MAX_INODE ÓÉ16384¸ÄΪ262144¡£

Ò»°ãÇé¿öÏ£¬×î´ó´ò¿ªÎļþÊý±È½ÏºÏÀíµÄÉèÖÃΪÿ4MÎïÀíÄÚ´æ256£¬±ÈÈç256MÄÚ´æ¿ÉÒÔÉèΪ16384£¬¶ø×î´óµÄʹÓõÄi½ÚµãµÄÊýÄ¿Ó¦¸ÃÊÇ×î´ó´ò¿ªÎļþÊýÄ¿µÄ3±¶µ½4±¶¡£

3.5 ʹÓÃÄÚ´æÎļþϵͳ

ÔÚLinuxÖпÉÒÔ½«Ò»²¿·ÖÄÚ´æµ±×÷·ÖÇøÀ´Ê¹Óã¬ÎÒÃdzÆ֮ΪRamDisk¡£¶ÔÓÚһЩ¾­³£±»·ÃÎʵÄÎļþ£¬¶øËüÃÇÓÖ²»»á±»¸ü¸Ä£¬¿ÉÒÔ½«ËüÃÇͨ¹ýRamDisk·ÅÔÚÄÚ´æÖУ¬¼´¿ÉÃ÷ÏÔµØÌá¸ßϵͳµÄÐÔÄÜ¡£µ±È»ÄãµÄÄÚ´æ¿ÉÒª×ã¹»´óÁË¡£RamDiskÓÐÁ½ÖÖ£¬Ò»ÖÖ¿ÉÒÔ¸ñʽ»¯£¬¼ÓÔØ£¬ÔÚLinuxÄÚºË2.0/2.2¾ÍÒѾ­Ö§³Ö£¬Æä²»×ãÖ®´¦ÊÇ´óС¹Ì¶¨¡£ÁíÒ»ÖÖÊÇÄÚºË2.4²ÅÖ§³ÖµÄ£¬Í¨¹ýRamfs»òÕßtmpfsÀ´ÊµÏÖ£¬ËüÃDz»Äܱ»¸ñʽ»¯£¬µ«ÊÇÓÃÆðÀ´Áé»î£¬Æä´óСËæËùÐèÒªµÄ¿Õ¼ä¶øÔö¼Ó»ò¼õÉÙ¡£ÕâÀïÖ÷Òª½éÉÜÒ»ÏÂRamfsºÍTmpfs¡£

Ramfs¹ËÃû˼ÒåÊÇÄÚ´æÎļþϵͳ£¬Ëü¹¤×÷ÓÚÐéÄâÎļþϵͳ£¨VFS£©²ã¡£²»Äܸñʽ»¯£¬¿ÉÒÔ´´½¨¶à¸ö£¬ÔÚ´´½¨Ê±¿ÉÒÔÖ¸¶¨Æä×î´óÄÜʹÓõÄÄÚ´æ´óС¡£Èç¹ûÄãµÄLinuxÒѾ­½«Ramfs±àÒë½øÄںˣ¬Äã¾Í¿ÉÒÔºÜÈÝÒ×µØʹÓÃRamfsÁË¡£´´½¨Ò»¸öĿ¼£¬¼ÓÔØRamfsµ½¸ÃĿ¼¼´¿É¡£

# mkdir -p /RAM1
# mount -t ramfs none /RAM1

ȱʡÇé¿öÏ£¬Ramfs±»ÏÞÖÆ×î¶à¿ÉʹÓÃÄÚ´æ´óСµÄÒ»°ë¡£¿ÉÒÔͨ¹ýmaxsize£¨ÒÔkbyteΪµ¥Î»£©Ñ¡ÏîÀ´¸Ä±ä¡£

ÒýÓÃ:
# mkdir -p /RAM1
# mount -t ramfs none /RAM1 -o maxsize=10000


ÒÔÉϼ´´´½¨ÁËÒ»¸öÏÞ¶¨ÁË×î´óʹÓÃÄÚ´æ´óСΪ10MµÄramdisk¡£

TmpfsÊÇÒ»¸öÐéÄâÄÚ´æÎļþϵͳ£¬Ëü²»Í¬ÓÚ´«Í³µÄÓÿéÉ豸ÐÎʽÀ´ÊµÏÖµÄramdisk£¬Ò²²»Í¬ÓÚÕë¶ÔÎïÀíÄÚ´æµÄRamfs¡£Tmpfs¿ÉÒÔʹÓÃÎïÀíÄڴ棬Ҳ¿ÉÒÔʹÓý»»»·ÖÇø¡£ÔÚLinuxÄÚºËÖУ¬ÐéÄâÄÚ´æ×ÊÔ´ÓÉÎïÀíÄڴ棨RAM£©ºÍ½»»»·ÖÇø×é³É£¬ÕâЩ×ÊÔ´ÊÇÓÉÄÚºËÖеÄÐéÄâÄÚ´æ×ÓϵͳÀ´¸ºÔð·ÖÅäºÍ¹ÜÀí¡£Tmpfs¾ÍÊǺÍÐéÄâÄÚ´æ×ÓϵͳÀ´"´ò½»µÀ"µÄ£¬ËüÏòÐéÄâÄÚ´æ×ÓϵͳÇëÇóÒ³À´´æ´¢Îļþ£¬ËüͬLinuxµÄÆäËüÇëÇóÒ³µÄ²¿·ÖÒ»Ñù£¬²»ÖªµÀ·ÖÅä¸ø×Ô¼ºµÄÒ³ÊÇÔÚÄÚ´æÖл¹ÊÇÔÚ½»»»·ÖÇøÖС£TmpfsͬRamfsÒ»Ñù£¬Æä´óСҲ²»Êǹ̶¨µÄ£¬¶øÊÇËæ×ÅËùÐèÒªµÄ¿Õ¼ä¶ø¶¯Ì¬µÄÔö¼õ¡£Ê¹ÓÃtmpfs£¬Ê×ÏÈÄã±àÒëÄÚºËʱµÃÑ¡Ôñ"ÐéÄâÄÚ´æÎļþϵͳ֧³Ö£¨Virtual memory filesystem support£©" £¬È»ºó¾Í¿ÉÒÔ¼ÓÔØtmpfsÎļþϵͳÁË¡£

# mkdir -p /mnt/tmpfs
# mount tmpfs /mnt/tmpfs -t tmpfs

ΪÁË·ÀÖ¹tmpfsʹÓùý¶àµÄÄÚ´æ×ÊÔ´¶øÔì³ÉϵͳµÄÐÔÄÜϽµ»òËÀ»ú£¬¿ÉÒÔÔÚ¼ÓÔØʱָ¶¨tmpfsÎļþϵͳ´óСµÄ×î´óÏÞÖÆ¡£

# mount tmpfs /mnt/tmpfs -t tmpfs -o size=32m

ÒÔÉÏ´´½¨µÄtmpfsÎļþϵͳ¾Í¹æ¶¨ÁËÆä×î´óµÄ´óСΪ32M¡£²»¹ÜÊÇʹÓÃramfs»¹ÊÇtmpfs£¬±ØÐëÃ÷°×µÄÊÇ£¬Ò»µ©ÏµÍ³ÖØÆô£¬ËüÃÇÖеÄÄÚÈݽ«»á¶ªÊ§¡£ËùÒÔÄÇЩ¶«Î÷¿ÉÒÔ·ÅÔÚÄÚ´æÎļþϵͳÖеøù¾ÝϵͳµÄ¾ßÌåÇé¿ö¶ø¶¨¡£

3.6 ʹÓÃÈÕÖ¾Îļþϵͳ

Èç¹ûLinuxϵͳÓÉÓÚÒâÍâÇé¿ö¶øûÓÐÕý³£¹Ø»ú£¬Ôò¿ÉÄÜÒýÆðÎļþϵͳÖÐijЩÎļþµÄÔªÊý¾Ý£¨meta-data¼´ºÍÎļþÓйصÄÐÅÏ¢£¬ÀýÈ磺ȨÏÞ¡¢ËùÓÐÕßÒÔ¼°´´½¨ºÍ·ÃÎÊʱ¼ä£©Ôâµ½ÆÆ»µ¡£ÎļþϵͳÐèҪά»¤ÎļþµÄÔªÊý¾ÝÀ´±£Ö¤ÎļþµÄ¿É×éÖ¯ºÍ¿É´æÈ¡£¬Èç¹ûÔªÊý¾Ý´¦ÓÚ²»ºÏÀí»ò²»Ò»ÖµÄ״̬£¬ÄÇô¾Í²»ÄÜ·ÃÎʺʹæÈ¡Îļþ¡£µ±ÏµÍ³ÖØÐÂÆô¶¯Ê±£¬fsck½«É¨Ãè/etc/fstabÎļþÖÐËùÁгöµÄËùÓÐÎļþϵͳ£¬È·±£ËüÃǵÄÔªÊý¾Ý´¦ÓÚ¿ÉÓõÄ״̬¡£Èç¹û·¢ÏÖÔªÊý¾Ý²»Ò»Ö£¬fsck½«É¨ÃèºÍ¼ì²âÔªÊý¾Ý£¬²¢¾ÀÕý´íÎó¡£Èç¹ûÎļþϵͳºÜ´ó£¬Õâ¸ö¹ý³Ì½«ÐèÒªºÜ³¤µÄʱ¼ä¡£Îª½â¾öÕâ¸öÎÊÌ⣬¿ÉÒÔʹÓÃÈÕÖ¾Îļþϵͳ¡£ÈÕÖ¾ÎļþϵͳÓöÀÁ¢µÄÈÕÖ¾Îļþ¸ú×Ù´ÅÅÌÄÚÈݵı仯£¬ÔÚдÈëÎļþÄÚÈݵÄͬʱдÈëÎļþµÄÔªÊý¾Ý¡£Ã¿´ÎÐÞ¸ÄÎļþµÄÔªÊý¾Ýʱ£¬¶¼ÒªÏÈÏò³ÆΪ"ÈÕÖ¾"µÄÊý¾Ý½á¹¹µÇ¼ÇÏàÓ¦µÄÌõÄ¿¡£ÕâÑù£¬ÈÕÖ¾Îļþϵͳ¾Íά»¤ÁË×î½ü¸ü¸ÄµÄÔªÊý¾ÝµÄ¼Ç¼¡£µ±¼ÓÔØÈÕÖ¾Îļþϵͳʱ£¬Èç¹û·¢ÏÖÁË´íÎ󣬲»»áɨÃèÕû¸öÎļþϵͳµÄÔªÊý¾Ý£¬¶øÊǸù¾ÝÈÕÖ¾¼ì²é×î½ü±»¸ü¸ÄµÄÔªÊý¾Ý¡£ËùÒÔÏà¶ÔÓÚ´«Í³µÄÎļþϵͳ£¨Èçext2£©£¬ÈÕÖ¾Îļþϵͳ´ó´óµØ¼Ó¿ìÁËɨÃèºÍ¼ì²âµÄʱ¼ä¡£

LinuxÏ¿ÉÓõÄÈÕÖ¾ÎļþϵͳºÜ¶à£¬ÈçXFS£¬JFS£¬Reiserfs£¬ext3µÈµÈ¡£ÈÕÖ¾ÎļþϵͳÖ÷Òª±»Éè¼ÆΪ·þÎñÆ÷»·¾³Ìṩ³öÉ«ÐÔÄܺ͸߿ÉÓÃÐÔ¡£µ±È»£¬ Linux ¹¤×÷Õ¾ºÍ¼ÒÓûúÆ÷Ò²¿É´Ó¾ßÓиßÐÔÄܵĿɿ¿ÈÕÖ¾ÎļþϵͳÖлñÒæ¡£°²×°ÈÕÖ¾Îļþϵͳ£¬Ò»°ãÐèÒªÏÂÔØÏàÓ¦µÄѹËõ°ü¡¢ÎªÄں˴ò²¹¶¡¡¢ÖØÐÂÅäÖúÍÖØбàÒëÄںˡ£ ÏêϸµÄ°²×°¹ý³Ì¿É·ÃÎÊÏàÓ¦ÎļþϵͳµÄ¹Ù·½ÍøÕ¾¡£

4£®ÆäËü·½ÃæµÄµ÷г

4.1 µ÷гbuffermem

ÎļþbuffermenºÍÄÚºËÐéÄâÄÚ´æ×ÓϵͳÃÜÇÐÏà¹Ø¡£Îļþ/proc/sys/vm/buffermem¿ØÖƶà´óÄÚ´æ±»ÓÃÓÚ»º³åÇø£¨°Ù·ÖÊý±íʾ£©¡£ÄÚºË2.4µÄȱʡֵΪ£º: "2 10 60"¡£¿ÉÒÔ°´ÈçÏ·½·¨Ð޸ģº

# echo "70 10 60" >/proc/sys/vm/buffermem

²¢½«Ö®¼Óµ½½Å±¾Îļþ/etc/rc.d/rc.local ÖС£»òÕßÔÚ/etc/sysctl.confÎļþÖмÓÈë

vm.buffermem = 70 10 60

µÚÒ»¸ö²ÎÊý 70Òâζ×ÅÖÁÉÙ·ÖÅä70%µÄÄÚ´æÓÃ×÷»º³åÇø¡£ºóÁ½¸ö²ÎÊý±£³ÖϵͳµÄĬÈÏÖµ¡£µÚÒ»¸ö²ÎÊýÉèÖÃΪ¶à´óºÏÊÊ£¬ÒÀÀµÓÚϵͳµÄÄÚ´æ´óСºÍϵͳ¸ß¸ºÔØʱÄÚ´æµÄʹÓÃÇé¿ö£¨¿ÉÓÃfree¼àÊÓ£©¡£

4.2 ½ø³ÌÏÞÖÆ

Linux¶ÔÓÚÿ¸öÓû§£¬ÏµÍ³ÏÞÖÆÆä×î´ó½ø³ÌÊý¡£ÎªÌá¸ßÐÔÄÜ£¬¿ÉÒÔÉèÖ󬼶Óû§rootµÄ×î´ó½ø³ÌÊýΪÎÞÏÞ¡£±à¼­.bashrcÎļþ£¨vi /root/.bashrc£©Ôö¼ÓÐÐ"ulimit -u unlimited"¼´¿ÉÏû³ý³¬¼¶Óû§µÄ½ø³ÌÏÞÖÆ¡£

ºËÐĺÍϵͳ¶ÔÓû§½ø³ÌÆäËüµÄһЩÏÞÖÆÒ²¿ÉÒÔͨ¹ýulimitÃüÁîÀ´²é¿´ºÍ¸ü¸Ä¡£"ulimit -a" ÓÃÀ´ÏÔʾµ±Ç°µÄ¸÷ÖÖÓû§½ø³ÌÏÞÖÆ¡£Ò»Ð©¸ü¸ÄÓû§ÏÞÖƵÄÀý×ÓÈçÏ£º

ulimit -n 4096 ½«Ã¿¸ö½ø³Ì¿ÉÒÔ´ò¿ªµÄÎļþÊýÄ¿¼Ó´óµ½4096£¬È±Ê¡Îª1024
ulimit -m 4096 ÏÞÖÆÿ¸ö½ø³ÌʹÓõÄÄÚ´æÊý¡£

4.3 ÓÅ»¯gcc±àÒë

½«ÓÅ»¯±êÖ¾·ÅÔÚ/etc/profileÎļþÖС£ÔÚpentium III¼¶µÄ´¦ÀíÆ÷ÉÏʹÓÃÒÔÏÂÓÅ»¯±êÖ¾½«µÃµ½×îÓŵÄÓ¦ÓóÌÐò£º

CFLAGS=-O9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro -march=pentiumpro -fomit-frame-pointer -fno-exceptions

ÔÙ½«ÈçÏÂÐмӵ½/etc/profile ¸ü¿¿ºóµÄλÖãº

export PATH PS1 HOSTNAME HISTSIZE HISTFILESIZE USER LOGNAME MAIL INPUTRC CFLAGS LANG LESSCHARSET

ʹÓÃÒÔÉϵÄÓÅ»¯£¬gcc»òÕßegcs±àÒëµÄ³ÌÐò½«µÃµ½×î¼ÑµÄÐÔÄÜ¡£

4.4 ±àÒëÄÚºËÓÅ»¯

±à¼­/usr/src/linux/MakefileÎļþ£¬¿ÉÒÔ¸ù¾Ý¾ßÌåµÄcpuÓÅ»¯Äں˱àÒë¡£ÒÔϵIJÎÊýÉèÖý«µÃµ½ÓÅ»¯µÄÄÚºËÐÔÄÜ¡£

ÒýÓÃ:
¢Ù vi +18 /usr/src/linux/Makefile £¬½«HOSTCC =gcc¸ÄΪ HOSTCC =egcs.
¢Ú vi +25 /usr/src/linux/Makefile
½«CC =$(CROSS_COMPILE)gcc D__KERNEL__ -I$(HPATH)
¸ÄΪ CC =$(CROSS_COMPILE)egcs D__KERNEL__ -I$(HPATH).
¢Û vi +90 /usr/src/linux/Makefile
½«CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
¸ÄΪCFLAGS = -Wall -Wstrict-prototypes -O9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro -march=pentiumpro -fomit-frame-pointer -fno-exceptions
¢Ü vi +19 /usr/src/linux/Makefile
½«HOSTCFLAGS =-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
¸ÄΪHOSTCFLAGS =-Wall -Wstrict-prototypes -O9 -funroll-loops -ffast-math -malign-double -mcpu=pentiumpro -march=pentiumpro -fomit-frame-pointer -fno-exceptions


¸ù¾ÝÒÔÉÏÐ޸ĺóµÄmakefileÎļþÖØбàÒëÄں˽«µÃµ½½ÏÓŵÄÐÔÄÜ¡£

5£® ½áÊøÓï

LinuxÊÇÒ»¸öÁé»î¶øÓÖ¿ª·ÅµÄϵͳ¡£Óû§¿ÉÒÔÕë¶Ô¾ßÌåµÄÓ¦Óû·¾³£¬´ÓϵͳµÄÍâΧµ½ÏµÍ³µÄ Äں˽øÐе÷г¡£ÏµÍ³µÄÍâΧµÄµ÷г°üÀ¨ÏµÍ³Ó²¼þµÄÅäÖõ½ÏµÍ³°²×°ºÍϵͳ·þÎñµÄÓÅ»¯µÈ¡£ÏµÍ³Äں˵ĵ÷г°üÀ¨²ÎÊýµÄÐ޸ĺ͸ĽøϵͳµÄÔ´´úÂë¡£ÎÒÃÇÔÚÕë¶ÔÓÃ×÷db2Êý¾Ý¿â·þÎñÆ÷µÄLinuxϵͳµÄµ÷гÖУ¬Õë¶Ôdb2Êý¾Ý¿âµÄÌص㣬°´ÕÕ±¾Îĵĸ÷¸öµ÷г·½Ã棬ÁíÍ⻹°üÀ¨ÍøÂçµÄµ÷г£¬¶ÔϵͳÐÔÄܽøÐÐÁË×ۺϵ÷г¡£ÔÚ¶Ôµ÷гºóµÄϵͳµÄ×ۺϲâÊÔÀ´¿´£¬ÏµÍ³µÄÐÔÄÜÓкܴóµÄ¸Ä½ø¡£

²Î¿¼×ÊÁÏ£º

Gerhard Mourani . Securing and Optimizing Linux[M] , OpenNA Inc, May 2001
Daniel Robbins, Advanced filesystem implementor's guide[J/OL], www-106.ibm.com/developerworks/library
Fergus Donohue . System Tuning Info for Linux Servers[R] , people.redhat.com/alikins
Moshe Bar, Linux ¼¼ÊõÄÚÄ»[M], Ç廪´óѧ³ö°æÉ磬2001
×÷Õß½éÉÜ:

µËÑÓ¾ü£¬ÄУ¬ºþÄÏÓÀÖÝÈË£¬Î÷°²µç×ӿƼ¼´óѧÈí¼þ¹¤³ÌÑо¿Ëù˶ʿÑо¿Éú£¬Ö÷ÒªÑо¿·½Ïò¶à²¥Ð­Ò飬ϵͳµ÷г¡£Äú¿ÉÒÔͨ¹ýµç×ÓÓʼþ deng.yanjun@163.com ºÍËûÁªÏµ¡£
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 1 ÌõÆÀÂÛ

  1. wide ÓÚ 2006-05-01 01:04:02·¢±í:

    Ö§³Ö·ÖÏí