Last updated by
5 years ago
Page: Grails Test On Virtual Server, Version:0
Testing Grails 1.0RC1 on a virtual server
In summary:
For those who dont want to read further, here is a quick summary. Grails has been tested on a virtual server with limited resources, where a small application with several domain object performed well under load. During these tests Tomcat was configured with 128MB maximum heap and ran without incident (tomcat was not using the entire heap). Given this I lowered the heap size to 96MB and the application continued to function well. I believe Grails may run with less memory that 96MB but I have not tested this yet. It is possible to run grails with less than 96MB of RAM see notes below.Test Application:
In order to find out how Grails performs on a virtual host, I have generated a simple application that is linked below. This application was written using Grails 1.0 RC1. For the purpose of these tests our choice of domain was a simple (somewhat non-functional) Bookstore. Basically the application consits of a Bookstore object that contains many StockItems, each stock item links to a Book, and the book belongs to a Category. Category therefore has many books.Test data is generated at application startup, each of 3 Categories has 100 Books. Each book has a StockItem and there is one Bookshop.The application can be downloaded here: ^perftest.zip (+) Purpose of test:
This test is to find out how grails runs in an environment with limited memory, processor and disk - such as when hosting on a virtual server. As an output of this test we will have graphs of pages served per minute, average delay and worst case delay for several common use-cases, I will repeat the tests lowering the memory until the tests fail.Test setup
Microsoft Vitrual PC (single processor, 600MB RAM, 800MB Swap (not used during test)). Ubuntu Linux Version 7 MySQL 5 installed Tomcat 6.0.14 (min heap:128M max heap: 128M) Removed all example applications leaving just manager and perftest.Test 1
10 concurrent users Each user lists Book pages 1 then 2 then 3 128MB heap
Test 2
10 concurrent users Each user lists Book page 1, then selects to show Book 1 128MB heap
Test 3
10 concurrent users Show category 1 - this involves rendering one hundred book records, and as expected caused the most load. 128MB heap
Test 4 - lower memory
10 concurrent users Each user lists Book pages 1 then 2 then 3 96MB heap