• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Performance: Horizontal scalability or vertical scalabiltiy

 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When enhancing application performance, should horizontal scalability or vertical scalability needs to be addressed first? What factors are needed to be exam before making the decision besides CPU, memory, workload? Does replacing slow cpu by fast cpu help? Thanks
[ July 28, 2005: Message edited by: vu lee ]
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to Performance forum...
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Whoa - what a nice general question.
What type of application are we talking about here? There are so many possibilities.
What measure of performance? Perceived delay of first response? CPU utilization? Network load? Number of simultaneous users?
That said, Java code can be written to utilize multi-core or multiple CPU systems very efficiently.
Bill
 
vu lee
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bill,
This is an online shopping cart application using J2EE platform. The performance is measured by the throughput at peak time when a max number of requests specified in the requirement doc hits the app server.
I have another general question, performance (1) vs extendability, managability, and maintainability (2). Most of J2EE patterns increase the (2) but reduce (1). I have heard many people said that there must be a balance between (1) and (2), but it's hard to determine where the balance is. My opinion is to achieve performance first and then perform refactory to achieve (2), but how do I know that this is the best possible performance this application can achieve.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by vu lee:
My opinion is to achieve performance first and then perform refactory to achieve (2)



It's actually much better to do it exactly the other way around. That is because performance optimization often goes at the cost of code structure, but a good code structure actually makes it easier to optimize performance.

but how do I know that this is the best possible performance this application can achieve.



Achieving the *best* performance almost never is an option, simply because it is too costly. What you need to find out is what performance you actually will *need*.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To add to my earlier post, once you know what performance you need, you should start with a system of a perfectly maintainable design, profile it to find the bottlenecks and work on improving those. That's the most cost effective way to get the performance you are looking for.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are a few things that prevent horizontal scalability, mostly around sessions, stateful services and and any Single Point of Failure problems. If you think you'll ever need to move from running on one JVM to running on two to a million, you should consider what it takes to avoid those things.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic