您的位置:首页 > 移动开发 > Android开发

Android x86 4.3 修改默认启动为竖版屏幕,480x800分辨率

2013-12-21 11:56 579 查看
1,显著影响系统性能的4种资源
(1),CPU时间
(2),内存
(3),硬盘I/O
(4),网络I/O
2,分析CPU使用情况
使用vmstat采集CPU的性能瓶颈
[root@local]# vmstat 2
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
1 1 152 14244 19068 531804 0 0 13 106 673 496 9 0 90 1 0
1 0 152 18472 18964 526620 0 0 3124 0 4447 4735 45 5 35 16 0
2 0 152 17624 19036 527576 0 0 474 2244 1285 946 49 1 43 8 0
用户时间,系统时间,空闲时间,等待时间分别在右边us列,sy列,id列,wa列中显示。用户时间数据较大一般表明计算机处于运算状态,系统时间数字较大表明进程正处于大量系统调用或者执行I/O操作。cs列显示的是每个时间段中上下文切换的次数,也就是内核切换当前运行进程的次数。每个时间间隔内的中断数(硬件设备或者内核组件)在in列显示。
拥有多个处理器的服务器,mpstat名利能够给出单个处理器,-P标志能让你指定一个要给出报告的特定处理器。mpstat对于调试SMP的软件很有用户。
[root@tc2 /]# mpstat -P ALL 5
15时56分48秒 CPU %user %nice %sys %iowait %irq %soft %steal %idle intr/s
15时56分48秒 all 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 1014.83
15时56分48秒 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 1014.63
15时56分48秒 1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 0.00

3,内存使用情况分析
内存的使用情况基本上用三个数字来量化:活动虚拟内存的总量,swapping,paging。第一个数字表明内存的总需求量,后两个数字表明那些内存有多少比例正处于使用中。
用free命令来判断当前投入使用的内存和交换空间的数量。用参数-t标志会自动计算虚拟内存的重量。
[root@tc2 logs]# free -t
total used free shared buffers cached
Mem: 8168412 1541728 6626684 0 366680 677848
-/+ buffers/cache: 497200 7671212
Swap: 8385920 0 8385920
Total: 16554332 1541728 15012604
空闲列表以KB为单位,如果这个值 低于系统总内存量的3%就表明有问题。可以使用swapon来准确判断正在使用那些文件和分区作为交换空间。
[root@tc2 logs]# swapon -s
Filename Type Size Used Priority
/dev/sda3 partition 8385920 0 -1
系统将sda3做为交换空间,可以把交换空间分布在多个物理磁盘上几乎总是比较好的做法,使用多个交换磁盘比起一个磁盘来说,交换数据上所花的时间降低,还增加了交换存储的带宽。

可以用vmstat和procinfo命令提供有关调页和交换的信息,需要安装软件包procps-××和procinfo-××。
procinfo数据是从/proc中得到的数据以较好的形式显示出来。

[root@tc2 logs]# procinfo
Linux 2.6.18-128.el5 (mockbuild@builder10) (gcc 4.1.2 20080704 ) #1 SMP Wed Jan 21 10:41:14 EST 2009 8CPU [tc2]
Memory: Total Used Free Shared Buffers
Mem: 8168412 1582392 6586020 0 367028
Swap: 8385920 0 8385920
Bootup: Thu Mar 18 01:29:17 2010 Load average: 0.08 0.08 0.03 1/202 12848

user : 0:14:48.04 0.0% page in : 0
nice : 0:00:00.99 0.0% page out: 0
system: 0:13:41.53 0.0% swap in : 0
idle : 35d 10:26:32.79 99.9% swap out: 0
steal : 0:00:00.00 0.0%
uptime: 4d 10:22:57.21 context :353629169
irq 0: 382971529 timer irq 82: 0 uhci_hcd:usb6
irq 1: 3 i8042 irq 90: 534917 megasas
irq 3: 2 irq 98: 66 ata_piix
irq 4: 2 irq138: 4382093 0 0
irq 8: 1 rtc irq146: 731588 0 0
irq 9: 0 acpi irq154: 532683 0 0
irq 12: 4 i8042 irq162: 465323 0 0
irq 50: 21 ehci_hcd:usb1 irq170: 485729 0 0
irq 58: 38 ehci_hcd:usb2, uhci_ irq178: 1435470 0 0
irq 66: 0 uhci_hcd:usb3 irq186: 738741 0 0
irq 74: 0 uhci_hcd:usb4

procinfo -n3表示以3秒为间隔连续刷新输出结果。
4,sar连续采集和报告统计信息
sar与procinfo,vmstat,iostat显示的信息雷同,主要区别是:sar既能报告当前的数据,又能报告历史数据。sar是sysstat软件的一部分。可以在cron设置定期运行,sar默认10分钟为间隔报告自午夜起当天的CPU利用率。

5,浏览硬件信息
lspci 命令来列举所有的 PCI 设备。使用 lspci -v 命令来获得详细的信息,或使用 lspci -vv 命令来获得更详细的输出。

譬如,lspci 命令可以被用来判定系统视频卡的制造厂商、型号、以及内存大小:
[root@tc2 logs]# lspci -vv
00:00.0 Host bridge: Intel Corporation 82G33/G31/P35/P31 Express DRAM Controller (rev 0a)
Subsystem: Dell Unknown device 0220
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ >SERR- <PERR-
Latency: 0
Capabilities: [e0] Vendor Specific Information
00:01.0 PCI bridge: Intel Corporation 82G33/G31/P35/P31 Express PCI Express Root Port (rev 0a) (prog-if 00 [Normal decode])
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0, Cache Line Size: 64 bytes
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
Memory behind bridge: dfc00000-dfcfffff
Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- <SERR- <PERR-
BridgeCtl: Parity- SERR+ NoISA- VGA- MAbort- >Reset- FastB2B-
Capabilities: [88] #0d [0000]
Capabilities: [80] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [90] Message Signalled Interrupts: 64bit- Queue=0/0 Enable+
Address: fee00000 Data: 40b9
Capabilities: [a0] Express Root Port (Slot+) IRQ 0
Device: Supported: MaxPayload 128 bytes, PhantFunc 0, ExtTag-
Device: Latency L0s <64ns, L1 <1us
Device: Errors: Correctable- Non-Fatal- Fatal- Unsupported-
Device: RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop-
Device: MaxPayload 128 bytes, MaxReadReq 128 bytes
Link: Supported Speed 2.5Gb/s, Width x16, ASPM L0s, Port 2
Link: Latency L0s <256ns, L1 <4us
Link: ASPM Disabled RCB 64 bytes CommClk+ ExtSynch-
Link: Speed 2.5Gb/s, Width x0
Slot: AtnBtn- PwrCtrl- MRL- AtnInd- PwrInd- HotPlug- Surpise-
Slot: Number 1, PowerLimit 25.000000
Slot: Enabled AtnBtn- PwrFlt- MRL- PresDet- CmdCplt- HPIrq-
Slot: AttnInd Off, PwrInd On, Power-
Root: Correctable- Non-Fatal- Fatal- PME-
Capabilities: [100] Virtual Channel
Capabilities: [140] Unknown (5)
..........

----待续本文出自 “阿狼” 博客,请务必保留此出处http://alang85.blog.51cto.com/63107/280459
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: