Home >Database >Mysql Tutorial >简单测试数据库服务器单核处理能力的程序

简单测试数据库服务器单核处理能力的程序

WBOY
WBOYOriginal
2016-06-07 17:15:231140browse

简单测试数据库服务器单核处理能力的程序,作者声称测试了上百个不同的U,最快的是跑在linux上的 Intel Xeon X5680 3.33GHz six-

来自Julian Dyke的测试CPU单核心性能的存储过程,能够测试CPU的单核处理能力,顺便我也测试了一把

SET SERVEROUTPUT ON

SET TIMING ON
DECLARE
  n NUMBER := 0;
BEGIN
  FOR f IN 1..10000000
  LOOP
    n := MOD (n,999999) + SQRT (f);
  END LOOP;
  DBMS_OUTPUT.PUT_LINE ('Res = '||TO_CHAR (n,'999999.99'));
END;
/

下面是一个输出结果样本:
SQL> /
Res =  873729.72
PL/SQL procedure successfully completed.
Elapsed: 00:00:19.87

作者声称测试了上百个不同的U,最快的是跑在linux上的 Intel Xeon X5680 3.33GHz six-core , 8.92 秒。

(当然,这个脚本只是简单的测试,,并不全面。且单核的速度并不是一个CPU好坏的全部。仅供参考)

测试结果:测了几个类型的CPU,竟然是我的一台测试机(Intel Cpu)最快,秒杀HP和IBM,当然单核的处理能力仅仅是一个方面,稳定和并发才是小机的杀手锏

HPUX 安腾平台
Elapsed: 00:00:34.98
uname -a                                                                                                     
HP-UX wbdb2 B.11.31 U ia64 1705335017 unlimited-user license

CPU info:
 16 Intel(R) Itanium 2 9100 series processors (1.6 GHz, 18 MB)
          533 MT/s bus, CPU version A1
          32 logical processors (2 per socket)
          
IBM POWER 7 平台
Elapsed: 00:00:15.91    
lsattr -E -l proc0
frequency   3550000000     Processor Speed       False
smt_enabled true           Processor SMT enabled False
smt_threads 4              Processor SMT threads False
state       enable         Processor state       False
type        PowerPC_POWER7 Processor type        False


AMD CPU
time:  00: 00: 22.43
[root@dtydb3 ~]# uname -a
Linux dtydb3 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
vendor_id       : AuthenticAMD
model name      : AMD Opteron(tm) Processor 6128 HE
stepping        : 1
cpu MHz         : 800.000
cache size      : 512 KB

INTEL CPU    

Elapsed: 00:00:11.65
uname -a
Linux dtydb0 2.6.18-194.el5 #1 SMP Tue Mar 16 21:52:39 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 44
model name      : Intel(R) Xeon(R) CPU           E5649  @ 2.53GHz
stepping        : 2
cpu MHz         : 1596.000
cache size      : 12288 KB

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn