博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
写给高性能数据库引擎coolhash
阅读量:4213 次
发布时间:2019-05-26

本文共 3251 字,大约阅读时间需要 10 分钟。

前一段时间fourinone在ITEYE资讯上发表了一篇[url]http://www.iteye.com/news/29025-Fourinone-CoolHash[/url]高性能数据库引擎产品宣言,我回复评论说玩得酷,还要考得住,借用一些企鹅手机管家的台词,结果被fourinone十分不满意。又把我骂了一顿,我继续回击。面试的时候流行一句话,talk is cheap,show me the code,我在此又借用了一下,talk is cheap,show the benchmark!自此我每天一贴呼唤fourinone拿出benchmark,但至此他都没有回应!好吧我就自己动手看看CoolHash的高性能,我使用fourinone提到的4.05.06,进行了100并发100w请求的benchmark,并将代码放在[url]https://git.oschina.net/zhh5919/fourinonetest[/url]不料在并发场景下CoolHash就会抛出异常,啊高性能啊!
详细过程如下:
搞这个东东,目的只有一个让我们看看fourinone coolhash的所谓高性能。 搞起来的步骤:
[list]
[*]首先将项目导入eclipse中,会自动编译代码到bin目录,同时会将fourinone.jar copy到该 目录下,这个很重要,因为在fourinone提供的指南demo也是这么玩,尽量和他的demo一致, 要不fourinone会说你使用姿势不正确的。
[*]启动CoolHashServer 从命令行cmd下进入bin目录。然后执行 java -cp fourinone.jar; RunServer 然后看到启动log Start ParkService and waiting 4 seconds... Start CoolHashService and waiting 5 seconds... Please try connect to CoolHashServer now. ok CoolHashServer启动成功啊
[*]简单的benchmark,CoolHash只提供单线程的读写,而且仅仅是单线程写入几十个数据, 如果把他叫做benchmark,我想你看到这里,一定是呵呵 哈哈…… 那我们给他加点压力吧,100并发100w次请求,我想这不是什么难事儿吧!mongodb, ideawu开源的SSDB都能轻松做到,让我们来见识一下CoolHash看看行不行,我写了一段 模拟100并发100w请求的代码,在EasyCoolHashDemo,各位看官也可以帮我review一下。 执行看看吧! java -cp .;fourinone.jar EasyCoolHashDemo
[/list]
执行结果让我差点崩溃了,哦不是我崩溃,是我的电脑崩溃了,cpu几乎100%。 我的电脑配置i5-3470 3.2GHz的,内存4G,win7系统。 惊喜的是哪有这些~ 根本执行不了,就不断地报错~ 欢迎更多的小伙伴来按上面的步骤 试试看看有木有报错! @fourinone啊 这就你所说的高性能,不是单线程写入几十个kv,然后每个kv都秒级别 就是高性能了
INFO: DataWorker Number:8
Exception in thread "Thread-9" java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at com.fourinone.FileAdapter$1.getBytes(FileAdapter.java:317) at com.fourinone.ConstantBit$Target$1.getBytes(ConstantBit.java:22) at com.fourinone.ConstantBit$Target.getTargetBytes(ConstantBit.java:175)
at com.fourinone.DumpCtor.put(DumpCtor.java:208)
at EasyCoolHashDemo$Worker.run(EasyCoolHashDemo.java:39)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-56" java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at com.fourinone.FileAdapter$1.getBytes(FileAdapter.java:317) at com.fourinone.ConstantBit$Target$1.getBytes(ConstantBit.java:22) at com.fourinone.ConstantBit$Target.getTargetBytes(ConstantBit.java:175)
at com.fourinone.DumpCtor.put(DumpCtor.java:208)
at EasyCoolHashDemo$Worker.run(EasyCoolHashDemo.java:39)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-81" java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at com.fourinone.FileAdapter$1.getBytes(FileAdapter.java:317) at com.fourinone.ConstantBit$Target$1.getBytes(ConstantBit.java:22) at com.fourinone.ConstantBit$Target.getTargetBytes(ConstantBit.java:175)
at com.fourinone.DumpCtor.put(DumpCtor.java:208)
at EasyCoolHashDemo$Worker.run(EasyCoolHashDemo.java:39)
at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-70" java.lang.ArrayIndexOutOfBoundsException at java.lang.System.arraycopy(Native Method) at com.fourinone.FileAdapter$1.getBytes(FileAdapter.java:317) at com.fourinone.ConstantBit$Target$1.getBytes(ConstantBit.java:22) at com.fourinone.ConstantBit$Target.getTargetBytes(ConstantBit.java:175)
at com.fourinone.DumpCtor.put(DumpCtor.java:208)
at EasyCoolHashDemo$Worker.run(EasyCoolHashDemo.java:39)
at java.lang.Thread.run(Unknown Source)

转载地址:http://lqdmi.baihongyu.com/

你可能感兴趣的文章
《redis in action》key的自动过期
查看>>
《redis in action》redis持久化简介
查看>>
Oracle RAC Failover 详解
查看>>
批处理 自动修改 IP 地址
查看>>
Oracle RAC LoadBalance
查看>>
v$sql,v$sqlarea,v$sqltext 和 v$sql_plan 说明
查看>>
ORA-31623 When Submitting a Datapump Job [ID 308388.1]
查看>>
Oracle SYSAUX 表空间 说明
查看>>
RAC 安装patch 后启动实例 报错 ORA-00439 feature not enabled- Real Application Clusters 解决方法
查看>>
On RAC, expdp Removes the Service Name [ID 1269319.1]
查看>>
Important Changes to Oracle Database Patch Sets Starting With 11.2.0.2 [ID 1189783.1]
查看>>
Oracle alert log ALTER SYSTEM SET service_names='','SYS$SYS.KUPC$C_...' SCOPE=MEMORY SID='' 说明
查看>>
Oracle latch:library cache 导致 数据库挂起 故障
查看>>
Openfiler 配置 NFS 示例
查看>>
Oracle 11.2.0.1 RAC GRID 无法启动 : Oracle High Availability Services startup failed
查看>>
Oracle 18c 单实例安装手册 详细截图版
查看>>
Oracle Linux 6.1 + Oracle 11.2.0.1 RAC + RAW 安装文档
查看>>
Oracle 11g 新特性 -- Online Patching (Hot Patching 热补丁)说明
查看>>
Oracle 11g 新特性 -- ASM 增强 说明
查看>>
Oracle 11g 新特性 -- Database Replay (重演) 说明
查看>>