树莓派 2 到手 性能提升明显

2015-03-08 12:45:55 +08:00
 mengskysama
周五拿到的,发现公司没有hdmi显示器,昨天把镜像写到u盘发现不能从u盘启动,jd撸了张三棒子的U1的TF,写完镜像发现官方ubuntu默认ssh是关闭的,换了树莓派大便好歹连上了。

正好用上次在张大妈180剁到号称SSD的U盘来做测试 SanDisk Extreme CZ80 NTFS

写入测试
root@raspberrypi:/mnt/sandisk#
root@raspberrypi:/mnt/sandisk# dd bs=64k count=1k if=/dev/zero of=test oflag=dsync
1024+0 records in
1024+0 records out
67108864 bytes (67 MB) copied, 4.62741 s, 14.5 MB/s
root@raspberrypi:/mnt/sandisk# dd bs=128k count=1k if=/dev/zero of=test oflag=dsync
1024+0 records in
1024+0 records out
134217728 bytes (134 MB) copied, 9.35676 s, 14.3 MB/s
root@raspberrypi:/mnt/sandisk# dd bs=1M count=1K if=/dev/zero of=test oflag=dsync
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 77.8103 s, 13.8 MB/s
root@raspberrypi:/mnt/sandisk#

峰值负载
top - 15:57:39 up 19 min, 3 users, load average: 1.05, 0.45, 0.24
Tasks: 91 total, 2 running, 89 sleeping, 0 stopped, 0 zombie
%Cpu(s): 11.5 us, 16.0 sy, 0.0 ni, 59.3 id, 12.9 wa, 0.0 hi, 0.3 si, 0.0 st
KiB Mem: 949328 total, 932412 used, 16916 free, 438872 buffers
KiB Swap: 102396 total, 0 used, 102396 free, 447876 cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2292 root 20 0 4592 2468 1928 R 87.7 0.3 1:17.07 mount.ntfs
2298 root 20 0 4608 2524 1472 S 13.9 0.3 0:10.34 dd



复制1073741824 bytes (1.1 GB) NTFS to NTFS用时2分半

Sat Mar 7 16:05:53 UTC 2015
Sat Mar 7 16:08:32 UTC 2015

峰值负载
top - 16:07:37 up 29 min, 3 users, load average: 1.37, 0.77, 0.45
Tasks: 94 total, 2 running, 92 sleeping, 0 stopped, 0 zombie
%Cpu(s): 7.3 us, 12.5 sy, 0.0 ni, 73.1 id, 7.0 wa, 0.0 hi, 0.1 si, 0.0 st
KiB Mem: 949328 total, 936724 used, 12604 free, 441784 buffers
KiB Swap: 102396 total, 0 used, 102396 free, 450232 cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2292 root 20 0 4592 2468 1928 R 63.2 0.3 3:41.17 mount.ntfs
2327 root 20 0 3924 1228 1096 S 10.9 0.1 0:09.03 cp



内网FTP测试

百兆的路由器,笔记本只有无线网卡,NTFS读取还是挺快的,如果是千兆环境应该还能再快一点,应该能到16M/s附近。

[右] 227 Entering Passive Mode (192,168,61,117,84,193).
[右] 正在打开数据连接 IP: 192.168.61.117 端口: 21697
[右] RETR 1.mp4
[右] 150 Opening BINARY mode data connection for 1.mp4 (132995681 bytes).
[右] 226 Transfer complete. 下载: 1.mp4 126.83 MB 于 14 秒 (9.29 MB/秒)

系统负载
top - 18:53:41 up 7 min, 1 user, load average: 0.05, 0.13, 0.08
Tasks: 83 total, 1 running, 82 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.0 us, 1.8 sy, 0.0 ni, 97.3 id, 0.0 wa, 0.0 hi, 0.9 si, 0.0 st
KiB Mem: 949328 total, 928468 used, 20860 free, 446180 buffers
KiB Swap: 102396 total, 0 used, 102396 free, 451412 cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2205 root 20 0 4468 1748 1436 S 4.3 0.2 0:11.24 vsftpd
3 root 20 0 0 0 0 S 1.3 0.0 0:01.83 ksoftirqd/0


Benchmarks
========================================================================
BYTE UNIX Benchmarks (Version 5.1.3)

System: raspberrypi: GNU/Linux
OS: GNU/Linux -- 3.18.7-v7+ -- #755 SMP PREEMPT Thu Feb 12 17:20:48 GMT 2015
Machine: armv7l (unknown)
Language: en_US.utf8 (charmap="ANSI_X3.4-1968", collate="ANSI_X3.4-1968")
CPU 0: ARMv7 Processor rev 5 (v7l) (0.0 bogomips)

CPU 1: ARMv7 Processor rev 5 (v7l) (0.0 bogomips)

CPU 2: ARMv7 Processor rev 5 (v7l) (0.0 bogomips)

CPU 3: ARMv7 Processor rev 5 (v7l) (0.0 bogomips)

16:59:18 up 5 min, 1 user, load average: 0.08, 0.06, 0.03; runlevel 2

------------------------------------------------------------------------
Benchmark Run: Sat Mar 07 2015 16:59:18 - 17:27:29
4 CPUs in system; running 1 parallel copy of tests

Dhrystone 2 using register variables 2956203.9 lps (10.0 s, 7 samples)
Double-Precision Whetstone 498.4 MWIPS (9.9 s, 7 samples)
Execl Throughput 363.9 lps (29.6 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 73543.0 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 21005.5 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 193476.5 KBps (30.0 s, 2 samples)
Pipe Throughput 175674.7 lps (10.0 s, 7 samples)
Pipe-based Context Switching 31675.2 lps (10.0 s, 7 samples)
Process Creation 1287.5 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 1193.2 lpm (60.0 s, 2 samples)
Shell Scripts (8 concurrent) 335.5 lpm (60.1 s, 2 samples)
System Call Overhead 410617.8 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 2956203.9 253.3
Double-Precision Whetstone 55.0 498.4 90.6
Execl Throughput 43.0 363.9 84.6
File Copy 1024 bufsize 2000 maxblocks 3960.0 73543.0 185.7
File Copy 256 bufsize 500 maxblocks 1655.0 21005.5 126.9
File Copy 4096 bufsize 8000 maxblocks 5800.0 193476.5 333.6
Pipe Throughput 12440.0 175674.7 141.2
Pipe-based Context Switching 4000.0 31675.2 79.2
Process Creation 126.0 1287.5 102.2
Shell Scripts (1 concurrent) 42.4 1193.2 281.4
Shell Scripts (8 concurrent) 6.0 335.5 559.1
System Call Overhead 15000.0 410617.8 273.7
========
System Benchmarks Index Score 173.7

------------------------------------------------------------------------
Benchmark Run: Sat Mar 07 2015 17:27:29 - 17:55:45
4 CPUs in system; running 4 parallel copies of tests

Dhrystone 2 using register variables 11822874.0 lps (10.0 s, 7 samples)
Double-Precision Whetstone 1989.6 MWIPS (10.0 s, 7 samples)
Execl Throughput 1364.0 lps (29.9 s, 2 samples)
File Copy 1024 bufsize 2000 maxblocks 116583.7 KBps (30.0 s, 2 samples)
File Copy 256 bufsize 500 maxblocks 33022.0 KBps (30.0 s, 2 samples)
File Copy 4096 bufsize 8000 maxblocks 316438.0 KBps (30.0 s, 2 samples)
Pipe Throughput 700798.4 lps (10.0 s, 7 samples)
Pipe-based Context Switching 123270.4 lps (10.0 s, 7 samples)
Process Creation 2867.2 lps (30.0 s, 2 samples)
Shell Scripts (1 concurrent) 2690.9 lpm (60.1 s, 2 samples)
Shell Scripts (8 concurrent) 353.7 lpm (60.4 s, 2 samples)
System Call Overhead 1584507.7 lps (10.0 s, 7 samples)

System Benchmarks Index Values BASELINE RESULT INDEX
Dhrystone 2 using register variables 116700.0 11822874.0 1013.1
Double-Precision Whetstone 55.0 1989.6 361.7
Execl Throughput 43.0 1364.0 317.2
File Copy 1024 bufsize 2000 maxblocks 3960.0 116583.7 294.4
File Copy 256 bufsize 500 maxblocks 1655.0 33022.0 199.5
File Copy 4096 bufsize 8000 maxblocks 5800.0 316438.0 545.6
Pipe Throughput 12440.0 700798.4 563.3
Pipe-based Context Switching 4000.0 123270.4 308.2
Process Creation 126.0 2867.2 227.6
Shell Scripts (1 concurrent) 42.4 2690.9 634.7
Shell Scripts (8 concurrent) 6.0 353.7 589.4
System Call Overhead 15000.0 1584507.7 1056.3
========
System Benchmarks Index Score 443.7

======= Script description and score comparison completed! =======

总体来看秒一代十几条街不成问题。虽然网卡/USB仍然是共享480M带宽,NTFS的情况来看主要是写入有瓶颈,主要在CPU上(严格的来说在ntfs驱动上)用来做家庭NAS还是比较合适的,应该能跑满百兆带宽。做离线下载或者PT应该很生猛的,挂个几十TB种子问题应该也不大。如果拿来做web之类的开发问题应该也不大,跑个环境GUI+Editor应该绰绰有余的。
13346 次点击
所在节点    分享发现
66 条回复
mengskysama
2015-03-08 15:03:44 +08:00
@msg7086 ut可以,文件夹大小完全一致能跳过,deluge也有人改了git://github.com/Tydus/deluge -b v1.3.5-tydus。数据的话指不定hash之后也会坏掉,ut每次上传分块之前会做hash,libtorrent不清楚,反正客户端那边会校验。
zhujinliang
2015-03-08 15:04:22 +08:00
我在RS上买的,2月底时,询问被告知要到3月底才能发货,但下单后邮件通知3月6日可交付,顺丰快递又给耽搁了一天,今天上午收到
mengskysama
2015-03-08 15:11:02 +08:00
@k9982874 我没显示器这个暂时测不了,sad,感觉有点悬。
fffonion
2015-03-08 15:12:59 +08:00
来来来跑个分->这是B版 https://pastebin.mozilla.org/8824815
msg7086
2015-03-08 15:16:57 +08:00
@mengskysama 我知道ut可以,不过你这难道不是linux么。
而且PT站里跳过校验是个大问题,一旦出问题会被人鄙视的,重者会干你账号。
xfspace
2015-03-08 15:20:05 +08:00
还好我买B+买的早,又要准备剁手
ma6174
2015-03-08 15:23:19 +08:00
树莓派上ext4格式读写速度能甩ntfs几条街
mengskysama
2015-03-08 15:29:06 +08:00


晚上挺漂亮的
missdeer
2015-03-08 15:39:55 +08:00
Linux读写NTFS很吃CPU,换ext3之类的就完全无压力。

这代能跑满百兆带宽就值得剁手了!
test0x01
2015-03-08 15:39:59 +08:00
我基本上就在这上面开发
mengskysama
2015-03-08 15:51:36 +08:00
@msg7086 上面那个deluge可以。check也只能保证你现在的是对的,不代之后也没问题。其实就算出错其实也不可怕,一个客户端传了几个错误的分片就会被黑名单了。不想折腾老老实实check应该也不会特别慢的,至少也能到20M/s。

现在= =我也没真拿来挂种,到时候在折腾。我还得专门写个脚本批量把ut里面列表转到deluge里。。

@ma6174 总线就480M,ntfs瓶颈在写,pi2上读的话ext和ntfs应该差不多。
msg7086
2015-03-08 15:59:48 +08:00
@mengskysama 所以我是推荐直接弄个好点的x86平台(大概成本翻一倍吧),但是性能会好得多,可以跑Windows(或者Linux如果你喜欢),而且扩展性与性能也不像RP那样微妙。
1037U的板子,加个条子加个电源,应该不会超过500的。
NAS+PT+HTPC全在一起了。
J1800新出的,好像更贵一些,如果降价了性价比应该也不错的。
jefby
2015-03-08 16:03:14 +08:00
@test0x01
敢问下是做什么相关的开发呢?
Borden
2015-03-08 16:05:14 +08:00
这东西就不是为heavy duty设计的,真要拿来商用,性能瓶颈就不说了,光是故障率陡升那个点就应该会来得很早。
mengskysama
2015-03-08 16:19:40 +08:00
@msg7086
我看到了个 华擎D1800B 350
加个4G条子200
再加个miniitx机箱200
做nas或htpc用真心不错。。
byyhku
2015-03-08 16:56:30 +08:00
@mengskysama 话说 RP 2 芯片散热怎么样?B+ 加散执片没风扇基本上跑不了东西
mengskysama
2015-03-08 17:01:02 +08:00
@byyhku 暂时没有这个问题,夏天就不知道了,实在不行给他上个硅脂贴个硬币好了
arachide
2015-03-08 17:01:18 +08:00
@jefby 脚本 java都能跑

c/c++麻烦多
dowlare
2015-03-08 17:28:14 +08:00
想过弄个树莓做网关,就是因为网口性能不佳作罢,这么多次新版都没见改进,看来以后也不会有了……
arachide
2015-03-08 17:28:49 +08:00
@mengskysama 这个得30W+
树莓的nas功率5W,一年电费20 rmb

不可比

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://ex.noerr.eu.org/t/175313

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX