1

If an application already runs well on a laptop with a local webserver and db, how does it impact hardware sizing for when it is deployed into product?

We're piloting this application for the first time, and up until now the application runs fine off a mid tier laptop.

I assume any server will be more powerful than a laptop. How should one scale the requirements appropriately?

The main impacts I can see are:

  • Locality of DB (may be installed on a seperate server or data centre causing network issues - no idea if this even impacts cpu, memory specs)
  • Overhead of enterprise web container (currently using jetty, expected to move to tomcat for support reasons)
  • We're currently using Windows, server will most likely be in unix.

Not sure what applications details are relevant but: - Single thread application - Main function is to host a REST service which computes a algorithm of average complexity. Expecting around 16 requests a second max - Using Java and Postgre currently

Thanks!

Max
  • 639
  • 2
  • 6
  • 19
  • Your assumption is certainly *not* valid. Even small to medium virtual servers are often greatly outperformed by a laptop these days, especially one with an SSD. – Craig Ringer Nov 22 '13 at 07:30
  • What @CraigRinger said. You should definitely establish a baseline by load testing on hardware that resembles (in terms of CPU type, RAM size, HDD type etc) your production server and then scale from there. – Anders R. Bystrup Nov 22 '13 at 08:03
  • What if that hardware is not available currently? The laptop does not have a SSD. – Max Nov 22 '13 at 10:24
  • There's no real alternative to testing on something resembling the eventual hardware. Apparently small differences can have major results. You can start by profiling a typical run on the laptop and look at the memory used and the disk I/O. – Richard Huxton Nov 22 '13 at 11:04

1 Answers1

1

There's no substitute for a few things including testing on comparable server hardware and knowing the performance model of your stack. Keep in mind your requirements are likely to change over time, and often times it is more important to have a flexible approach to hardware (in terms of being able to move pieces of it onto other servers) than it is to have a rigid formula for what you need.

You should understand however, that different parts of your stack have different needs. PostgreSQL usually (not always, but usually) needs fast disk I/O and more processor cores (processor speed is usually less of a factor) while your Java app is likely to benefit from faster cores.

Here are my general rules:

  1. Do some general performance profiling, come to an understanding of where CPU power is being spent, and what is waiting on disk I/O.

  2. Pay close attention to server specs. Just because the server may be more powerful in some respects does not mean your application will perform better on it.

  3. Once you have this done, select your hardware with your load in mind. And then test on that hardware.

Edit: What we pay attention to at Efficito are the followingfor CPU:

  1. Cache size
  2. Cores
  3. GFLOPS/core
  4. Other performance metrics

For hard drives, we pay attention to the following:

  1. Speed
  2. Type
  3. RAID setup
  4. General burst and sustained throughput

Keep in mind your database-portions are more likely to be I/O bound, meaning you get more from paying attention to hard drive specs than from CPU specs, while your application code will more likely be CPU-bound, meaning better CPU specs give you better performance. Keep in mind we are doing virtualized hosting of ERP software on PostgreSQL and Apache, and so we get to balance both sides usually on the same hardware.

Chris Travers
  • 25,424
  • 6
  • 65
  • 182
  • Wow thats really great insight. Thank you! How would you suggest I go about leaning more insights like this? I really have no idea with speccing this kind of hardware. Hence why I am trying to translate my laptop specs into server specs. It's running fine on our dev machine which is a mid level laptop - how would you recommend we proceed? – Max Dec 22 '13 at 05:47
  • @Max, I added a little more detail about what we pay attention to at Efficito. – Chris Travers Dec 22 '13 at 07:07