Chinaunix首页 | 论坛 | 博客
  • 博客访问: 625846
  • 博文数量: 142
  • 博客积分: 116
  • 博客等级: 入伍新兵
  • 技术积分: 1445
  • 用 户 组: 普通用户
  • 注册时间: 2010-09-28 08:37
文章分类

全部博文(142)

文章存档

2017年(7)

2016年(57)

2015年(48)

2014年(30)

我的朋友

分类: Mysql/postgreSQL

2016-04-28 18:47:13

安装:
  1. ./configure --with-mysql-libs=/home/mysql/product/5.7/mysql-1/lib --with-mysql-includes=/home/mysql/product/5.7/mysql-1/include
  2. make
报错:
  1. /usr/bin/ld: cannot find -lmysqlclient_r
好像是新版mysql,so的名字变了。做个链接。
  1. cd /home/mysql/product/5.7/mysql-1/lib
  2. ln -s libmysqlclient.so.20.2.0 libmysqlclient_r.so
再make,通过。


cpu性能测试:
  1. # sysbench/sysbench --test=cpu --cpu-max-prime=20000 run
  2. sysbench 0.4.12.6: multi-threaded system evaluation benchmark
  3. Running the test with following options:
  4. Number of threads: 1
  5. Random number generator seed is 0 and will be ignored
  6. Doing CPU performance benchmark
  7. Threads started!
  8. Done.
  9. Maximum prime number checked in CPU test: 20000
  10. Test execution summary:
  11. total time: 32.7086s
  12. total number of events: 10000
  13. total time taken by event execution: 32.7073
  14. per-request statistics:
  15. min: 3.24ms
  16. avg: 3.27ms
  17. max: 7.83ms
  18. approx. 95 percentile: 3.27ms
  19. Threads fairness:
  20. events (avg/stddev): 10000.0000/0.00
  21. execution time (avg/stddev): 32.7073/0.00


线程测试:
  1. # sysbench/sysbench --test=threads --num-threads=64 --thread-yields=100 --thread-locks=2 run
  2. sysbench 0.4.12.6: multi-threaded system evaluation benchmark
  3. Running the test with following options:
  4. Number of threads: 64
  5. Random number generator seed is 0 and will be ignored
  6. Doing thread subsystem performance test
  7. Thread yields per test: 100 Locks used: 2
  8. Threads started!
  9. Done.
  10. Test execution summary:
  11. total time: 1.8260s
  12. total number of events: 10000
  13. total time taken by event execution: 116.4268
  14. per-request statistics:
  15. min: 0.05ms
  16. avg: 11.64ms
  17. max: 73.29ms
  18. approx. 95 percentile: 38.26ms
  19. Threads fairness:
  20. events (avg/stddev): 156.2500/9.32
  21. execution time (avg/stddev): 1.8192/0.00

磁盘性能测试:
  1. # sysbench/sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw prepare
  2. sysbench 0.4.12.6: multi-threaded system evaluation benchmark
  3. 128 files, 24576Kb each, 3072Mb total
  4. Creating files for the test...
  5. # sysbench/sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw run
  6. sysbench 0.4.12.6: multi-threaded system evaluation benchmark
  7. Running the test with following options:
  8. Number of threads: 16
  9. Random number generator seed is 0 and will be ignored
  10. Extra file open flags: 0
  11. 128 files, 24Mb each
  12. 3Gb total file size
  13. Block size 16Kb
  14. Number of random requests for random IO: 10000
  15. Read/Write ratio for combined random IO test: 1.50
  16. Periodic FSYNC enabled, calling fsync() each 100 requests.
  17. Calling fsync() at the end of test, Enabled.
  18. Using synchronous I/O mode
  19. Doing random r/w test
  20. Threads started!
  21. Done.
  22. Operations performed: 6033 Read, 4015 Write, 12703 Other = 22751 Total
  23. Read 94.266Mb Written 62.734Mb Total transferred 157Mb (272.08Mb/sec)
  24. 17413.36 Requests/sec executed
  25. Test execution summary:
  26. total time: 0.5770s
  27. total number of events: 10048
  28. total time taken by event execution: 4.6779
  29. per-request statistics:
  30. min: 0.01ms
  31. avg: 0.47ms
  32. max: 84.70ms
  33. approx. 95 percentile: 0.68ms
  34. Threads fairness:
  35. events (avg/stddev): 628.0000/87.04
  36. execution time (avg/stddev): 0.2924/0.03
  37. # sysbench/sysbench --test=fileio --num-threads=16 --file-total-size=3G --file-test-mode=rndrw cleanup
  38. sysbench 0.4.12.6: multi-threaded system evaluation benchmark
  39. Removing test files...

内存测试:
  1. # sysbench/sysbench --test=memory --memory-block-size=8K --memory-total-size=4G run
  2. sysbench 0.4.12.6: multi-threaded system evaluation benchmark
  3. Running the test with following options:
  4. Number of threads: 1
  5. Random number generator seed is 0 and will be ignored
  6. Doing memory operations speed test
  7. Memory block size: 8K
  8. Memory transfer size: 4096M
  9. Memory operations type: write
  10. Memory scope type: global
  11. Threads started!
  12. Done.
  13. Operations performed: 524288 (710223.59 ops/sec)
  14. 4096.00 MB transferred (5548.62 MB/sec)
  15. Test execution summary:
  16. total time: 0.7382s
  17. total number of events: 524288
  18. total time taken by event execution: 0.6791
  19. per-request statistics:
  20. min: 0.00ms
  21. avg: 0.00ms
  22. max: 0.73ms
  23. approx. 95 percentile: 0.00ms
  24. Threads fairness:
  25. events (avg/stddev): 524288.0000/0.00
  26. execution time (avg/stddev): 0.6791/0.00


OLTP测试:
  1. # sysbench/sysbench --test=oltp --mysql-table-engine=innodb --mysql-host=10.128.31.29 --mysql-user=xxx --mysql-password=xxx --mysql-db=xxx prepare
  2. sysbench 0.4.12.6: multi-threaded system evaluation benchmark
  3. No DB drivers specified, using mysql
  4. Creating table 'sbtest'...
  5. Creating 10000 records in table 'sbtest'...
  6. # sysbench/sysbench --test=oltp --mysql-table-engine=innodb --mysql-host=10.128.31.29 --mysql-user=xxx --mysql-password=xxx --mysql-db=xxx run
  7. sysbench 0.4.12.6: multi-threaded system evaluation benchmark
  8. No DB drivers specified, using mysql
  9. Running the test with following options:
  10. Number of threads: 1
  11. Random number generator seed is 0 and will be ignored
  12. Doing OLTP test.
  13. Running mixed OLTP test
  14. Using Special distribution (12 iterations, 1 pct of values are returned in 75 pct cases)
  15. Using "BEGIN" for starting transactions
  16. Using auto_inc on the id column
  17. Maximum number of requests for OLTP test is limited to 10000
  18. Using 1 test tables
  19. Threads started!
  20. Done.
  21. OLTP test statistics:
  22. queries performed:
  23. read: 140000
  24. write: 50000
  25. other: 20000
  26. total: 210000
  27. transactions: 10000 (91.40 per sec.)
  28. deadlocks: 0 (0.00 per sec.)
  29. read/write requests: 190000 (1736.69 per sec.)
  30. other operations: 20000 (182.81 per sec.)
  31. Test execution summary:
  32. total time: 109.4035s
  33. total number of events: 10000
  34. total time taken by event execution: 109.2957
  35. per-request statistics:
  36. min: 5.01ms
  37. avg: 10.93ms
  38. max: 36.29ms
  39. approx. 95 percentile: 11.91ms
  40. Threads fairness:
  41. events (avg/stddev): 10000.0000/0.00
  42. execution time (avg/stddev): 109.2957/0.00
  43. # sysbench/sysbench --test=oltp --mysql-table-engine=innodb --mysql-host=10.128.31.29 --mysql-user=xxx --mysql-password=xxx --mysql-db=xxx cleanup
  44. sysbench 0.4.12.6: multi-threaded system evaluation benchmark
  45. No DB drivers specified, using mysql
  46. Dropping table 'sbtest'...
  47. Done.




阅读(1838) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~