#ZipLib的性能测试

需要在程序中压缩一些文件, 然后再当作邮件附件发送.
所以在正式应用之前, 应该测试一下这个组件的性能. 下面是测试的结果.

  • 组件信息
    • 名称: SharpZipLib
    • 版本: 0.85.2.302
    • 编译时间: 2007/4/1
  • 附件描述
    • 类型: 文本文件
    • 文件内容: 随机英文字符
    • 其他: 考虑到真实情况下, 邮件发送会生成一个Zip文件, 发送, 再删除该文件, 本次性能测试也是压缩一个删除一个, 排除文件系统给此次结果带来的影响
  • 测试机配置
    • P4 3.0 HT
    • 2G内存
    • Windows 2003系统
  • 性能测试(除了特别指明, 压缩比率是默认”)
    • 100
      • 附件容量
        • 1K: 0
        • 50K: 1
        • 100K: 2
        • 250K: 6
        • 500K: 11
        • 1M: 23
    • 200
      • 附件容量
        • 1K: 1
        • 50K: 2
        • 100K: 5
        • 250K: 12
        • 500K: 25
        • 1M: 58
    • 500
      • 附件容量
        • 1K: 3
        • 50K: 9
        • 100K: 16
        • 250K: 46
        • 500K: 99
        • 1M: 171
    • 5000
      • 附件容量
        • 1K: 26
        • 50K: 89
    • 5000
      • 附件容量
        • 50K: 57 (压缩比率是0, 即不压缩, 仅存储)
  • 其他补充
    • 在双核或超线程CPU的服务器下, 压缩时, 一颗核心的占用率处于100%, 另一颗核心处在5%-10%之间, 如果服务器长时间未检测到鼠标键盘的操作(1-2分钟), 则两颗核心的占用率均会达到100%

附测试代码下载: 点此下载SharpZipLibPerformanceTest.Zip

Share
This entry was posted in 编程. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">