Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Some time ago I asked about hardware considerations of cloud based GeoStack implementation. As a follow up to this question

There are some good pointers in related question already, but they mainly refer to PostGIS.

So I wanted to ask you for some advice regarding memory allocation for a simple Web mapping Ubuntu box, based on PostGIS, GeoServer and OpenLayers/GeoEXT.

By simple in this case I mean serving maximum 10-20 WMS layers, caching, getFeatureInfo, and getting legends. Underlying dataset will consists of ~3000 polygons of administrative areas. It will be hosted on cloud VPS - either AWS or rackspace.

I have three questions regarding this setup:

  1. Does it make sense to keep PostgreSQL and Geoserver on two separate instances? Or is it better to focus on one, more powerful server?

  2. Cloud servers are scalable. So assuming 100% is the total amount of memory available - what would be your suggestions of setting memory parameters in PostgreSQL? And how about java memory allocation for GeoServer?

  3. Any other hints for tweaking memory?

Thanks for help.

PS I asked this question on GeoServer Users mailing lists but haven't recieved any suggestions so far.

share|improve this question
1  
Postgres and Geoserver on the same machine saves network lag. Have been experimenting with solid state drives - very fast access speeds.. ubuntu tweaks - itezer.com/blog/ubuntu-linux/… –  Mapperz Nov 18 '11 at 3:50
1  
As its EC2 you are targeting the best advice is to just try out different configurations and see what works best for your particular use. –  Matthew Snape Nov 18 '11 at 12:35
    
@Mapperz: Thanks a lot. SSDs would be really good improvement indeed. Could you recommend some geo friendly hosting with SSD? –  radek Nov 18 '11 at 15:26

2 Answers 2

up vote 3 down vote accepted

I attempt to answer your questions below:

  1. Does it make sense to keep PostgreSQL and Geoserver on two separate instances? Or is it better to focus on one, more powerful server?

By the reported number of layers and features I think one server should be enough, but I suggest you do the math and find out the cheapest combination, then move your way up if you find performance unsatisfactory.

  1. Cloud servers are scalable. So assuming 100% is the total amount of memory available - what would be your suggestions of setting memory parameters in PostgreSQL? And how about java memory allocation for GeoServer?

If you are memory constrained, just give 1GB to Geoserver and the rest to Postgres: tune java -Xmx and -Xms options to the same value of 1024M.

Ideally you would want to have the whole postgres Database sitting in RAM. BTW, this is not alway easy to achieve, this should help.

  1. Any other hints for tweaking memory?

Note: the following is related to amazon EC2 hosting, not the memory of the server per se.

I can't find the link right now but if you experience fluctuating performance you should consider going for the larger instances. The reasoning is that EC2 servers should (we don't know for sure) have something between 16 and 32 GB of RAM each so if you are on one server with 20 other 1.7GB instances you'll quite likely run into CPU or I/O contention while if your instance is larger the number of instances sharing the same physical hardware will be smaller and resources should be more fairly distributed (that's to say you get more and consistently so).

share|improve this answer
    
Thanks. +1 for thorough answer! –  radek Dec 22 '11 at 10:55

Given that you are doing DB and Java and probably on the same machine - get a machine with as much memory as you can. The more memory you give both of those pieces the happier they will be and the faster your response times. That said - you are also going to be disk intensive operations for both so get some fast disks. Depending on what you are doing with the stack you may or may not need CPU power.

How many concurrent users or requests do you expect on the box? What will these users be asking the box to do: serve tiles, do a geoprocess, calculate a spatial sql query? All this matter for the specs on your machine.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.