Your SlideShare is downloading. ×
0
Improving the Performance of a Grails Application
Improving the Performance of a Grails Application
Improving the Performance of a Grails Application
Improving the Performance of a Grails Application
Improving the Performance of a Grails Application
Improving the Performance of a Grails Application
Improving the Performance of a Grails Application
Improving the Performance of a Grails Application
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Improving the Performance of a Grails Application

960

Published on

Medium EC2 with RDS having no IOPS …

Medium EC2 with RDS having no IOPS
Grails 2.1.1 environment with a number of plugins 
Huge DB with transactions trying to insert as many as 100k records
New setup was limited in terms of CPU and memory resources and therefore reveal more glaring mistakes in code with regard to performance considerations

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
960
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Improving the Performance of a Grails Application
  • 2. About Neev Web Mobile Magento eCommerce SaaS Applications Video Streaming Portals Rich Internet Apps Custom Development iPhone Android Windows Phone 7 HTML5 Apps Cloud AWS Consulting Partner Rackspace Joyent Heroku Google App Engine Key Company Highlights 250+ team with experience in managing offshore, distributed development. Neev Technologies established in Jan ’05 VC Funding in 2009 By Basil Partners User Interface Design and User Experience Design Part of Publicis Groupe Member of NASSCOM. Performance Consulting Practices Development Centers in Bangalore and Pune. Quality Assurance & Testing Outsourced Product Development Offices at Bangalore, USA, Delhi, Pune, Singapore and Stockholm.
  • 3. The Scenario used for Testing Grails Application Performance • Medium EC2 with RDS having no IOPS • Grails 2.1.1 environment with a number of plugins • Huge DB with transactions trying to insert as many as 100k records • New setup was limited in terms of CPU and memory resources and therefore reveal more glaring mistakes in code with regard to performance considerations
  • 4. What helps to Improve Performance • Paste the code in console and type ‘Ctrl+R’. No need to navigate through screens or authentication • Change domain module to include only a reference of the parents key instead of the whole object. • Enable Hibernate’s second level of caching by adding suitable code to DataSource.groovy and by making changes in the domain class • Configure ehcache.xml • Create indexes on parent classes after using explain on MySQL tables. This improves performance marginally • Cleaning up Gorm after doing batch inserts also helps • Refer page for relevant code : http://www.neevtech.com/blog/2013/02/08/improving-your-grailsapplication-performance-look-jim-no-stored-procedures/
  • 5. The Real Bottleneck and the Solution • The session cache was very large because Grails has FlushMode set to ‘AUTO’ • It was observed that Grails makes a Session ‘Flush’ before querying - this could be reducing performance The remedy is to: • Import org.hibernate.FlushMode • Include this line, session.setflushMode (FlushMode.COMMIT) • Performance improvement after these changes - processes nearly 450k records in 1 hour as opposed to 20k records earlier in 2 hours. • Refer for relevant code and more info : http://www.neevtech.com/blog/2013/02/08/improving-your-grails-applicationperformance-look-jim-no-stored-procedures/
  • 6. Clients
  • 7. Partnerships
  • 8. Neev Information Technologies Pvt. Ltd. India - Bangalore India - Pune The Estate, # 121,6th Floor, #13 L’Square, 3rd Floor Dickenson Road Parihar Chowk, Aundh, Bangalore-560042 Pune – 411007. Phone :+91 80 25594416 Phone : +91-64103338 USA sales@neevtech.com Sweden Singapore Neev AB, Birger Jarlsgatan 1121 Boyce Rd Ste 1400, Pittsburgh PA 15241 Phone : +1 888-979-7860 #08-03 SGX Centre 2, 4 53, 6tr, Shenton Way, 11145, Stockholm Singapore 068807 Phone: +46723250723 Phone: +65 6435 1961 For more info on our offerings, visit www.neevtech.com

×