-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
94 lines (55 loc) · 3.26 KB
/
README
File metadata and controls
94 lines (55 loc) · 3.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
Welcome to Batoo JPA
F A S T E S T J P A I M P L E M E N T A T I O N
Batoo JPA is the fastest JPA Implementation by far.
It is 10 ~ 20 times faster then the leading JPA providers.
L I C E N S E
Copyright (c) 2012 - Batoo Software ve Consultancy Ltd.
This copyrighted material is made available to anyone wishing to use, modify,
copy, or redistribute it subject to the terms and conditions of the GNU
Lesser General Public License, as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
for more details.
You should have received a copy of the GNU Lesser General Public License
along with this distribution; if not, write to:
Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor
Boston, MA 02110-1301 USA
H E L L O R E S T
This project is a demonstration of how fast Batoo JPA compared to Hibernate on end to end context.
Application has 4 layers, (1) Spring Rest MVC, (2) Spring Data, (3) JPA, (4) MySQL JDBC
The following tests are run on Ubuntu 12.04 on Intel(R) Core(TM) i7-2670QM CPU @ 2.20GHz with 250GB SSD Disk
RUNNING
===========
1) Install Java by running "sudo apt-get install openjdk-7-jdk"
2) Download and install Apache Maven 3.0.4
3) Download and install Apache JMeter 2.8
4) Download and install Apache Tomcat 7.0.32
5) Install git by running "sudo apt-get install git"
6) Install a separate MySQL Server. Update the DB Settings in in the step (8) third command when editing the file gedit /src/main/java/org/batoo/jpa/hellorest/ApplicationConfig.java.
7) Check out and install Batoo JPA
git clone git://github.com/BatooOrg/BatooJPA.git
cd BatooJPA
mvn install -Dmaven.test.skip
8) Checkout and install HelloRest, edit ApplicationConfig and set the MySQL Connection parameters
git clone git://github.com/BatooOrg/HelloRest.git
cd HelloRest
gedit /src/main/java/org/batoo/jpa/hellorest/ApplicationConfig.java
mvn package
9) Copy the WAR file in HelloRest.war into Tomcat webapps
10) Change Directory to Tomcat Directory and run tomcat by "bin/catalina.sh run"
11) Run Apache JMeter and load the test test.jmx in HelloRest project.
12) Run the test to warm Tomcat.
13) Change the Counters in the test plan from 1000001 -> 2000001 & 1000001 -> 2000001
14) Run the test for benchmark now and at the end of the test note down the TesPlan -> ThreadGroup -> Aggregate Report, Througput Column
15) Change back the counters to 2000001 -> 1000001 & 2000001 -> 1000001
16) Edit /src/main/java/org/batoo/jpa/hellorest/ApplicationConfig.java and change BATOO_OR_HIBERNATE to false
17) Repeat steps (8) ~ (14)
R E S U L T S
On given hardware following are the throughputs obtained
Batoo JPA 2681 Req/s
Hibernate 1742 Req/s
Ratio ~ 153%
As HelloRest application consists of 4 layers, Replacing Hibernate with JPA virtually saves you the heavy CPU resources spent by Hibernate. As this big chunk of CPU is now available to the rest of the application, the application performance increases more then half.
More information on BAtoo JPA is available at http://batoo.jp