Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Performance: Horizontal scalability or vertical scalabiltiy

 
vu lee
Ranch Hand
Posts: 206
  • Mark post as helpful
  • send pies
  • 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 ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Performance forum...
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • 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: 206
  • Mark post as helpful
  • send pies
  • 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
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • 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
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • 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.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic