fastdfs 上传速度测试
虚拟机环境
一台tracker 192.168.8.91
两台storage 192.168.8.92/93
一台client 192.168.8.94
测试场景一:
两台storage同时工作,上传1000个100K的文件。
[2011-03-18 13:18:22] INFO - base_path=/home/fastdfs_storge, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0
tracker_query_storage_store_list_without_group:
server 1. group_name=group1, ip_addr=192.168.8.92, port=23000
server 2. group_name=group1, ip_addr=192.168.8.93, port=23000
group_name=group1, ip_addr=192.168.8.93, port=23000
storage_upload_by_filename
group_name=group1, remote_filename=M00/00/0F/wKgIXU2C62LUIrjnAAGQAJ2JkdA142.img
source ip address: 192.168.8.93
file timestamp=2011-03-18 13:19:30
file size=102400
file crc32=2643038672
file url: http://192.168.8.91/group1/M00/00/0F/wKgIXU2C62LUIrjnAAGQAJ2JkdA142.img
storage_upload_slave_by_filename
group_name=group1, remote_filename=M00/00/0F/wKgIXU2C62LUIrjnAAGQAJ2JkdA142_big.img
source ip address: 192.168.8.93
file timestamp=2011-03-18 13:19:30
file size=102400
file crc32=2643038672
file url: http://192.168.8.91/group1/M00/00/0F/wKgIXU2C62LUIrjnAAGQAJ2JkdA142_big.img
real 2m16.237s
user 0m0.466s
sys 0m14.181s
[root@client ~]#
耗时2分16秒。
==================================================================================================
测试场景二:
上传一半,关掉一台storage(192.168.8.93),上传1000个100K的文件。
关掉同时,上传文件较慢,之后速度较快,和两台storage同时工作速度一样。
[2011-03-18 13:26:35] INFO - base_path=/home/fastdfs_storge, connect_timeout=30, network_timeout=60, tracker_server_count=1, anti_steal_token=0, anti_steal_secret_key length=0
tracker_query_storage_store_list_without_group:
server 1. group_name=group1, ip_addr=192.168.8.92, port=23000
group_name=group1, ip_addr=192.168.8.92, port=23000
storage_upload_by_filename
group_name=group1, remote_filename=M00/00/2A/wKgIXE2C7UzoZxdwAAGQAJ2JkdA133.img
source ip address: 192.168.8.92
file timestamp=2011-03-18 13:27:40
file size=102400
file crc32=2643038672
file url: http://192.168.8.91/group1/M00/00/2A/wKgIXE2C7UzoZxdwAAGQAJ2JkdA133.img
storage_upload_slave_by_filename
group_name=group1, remote_filename=M00/00/2A/wKgIXE2C7UzoZxdwAAGQAJ2JkdA133_big.img
source ip address: 192.168.8.92
file timestamp=2011-03-18 13:27:40
file size=102400
file crc32=2643038672
file url: http://192.168.8.91/group1/M00/00/2A/wKgIXE2C7UzoZxdwAAGQAJ2JkdA133_big.img
real 3m35.092s
user 0m0.376s
sys 0m12.905s
[root@client ~]#
耗时3分35秒。
本文转自 liang3391 51CTO博客,原文链接:http://blog.51cto.com/liang3391/523688