File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Performance and the fly likes Performance: Horizontal scalability or vertical scalabiltiy Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Performance
Bookmark "Performance: Horizontal scalability or vertical scalabiltiy" Watch "Performance: Horizontal scalability or vertical scalabiltiy" New topic
Author

Performance: Horizontal scalability or vertical scalabiltiy

vu lee
Ranch Hand

Joined: Apr 19, 2005
Posts: 189
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

Joined: Jul 11, 2001
Posts: 14112
Moving to Performance forum...


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
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

Joined: Apr 19, 2005
Posts: 189
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

Joined: Jul 11, 2001
Posts: 14112
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

Joined: Jul 11, 2001
Posts: 14112
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

Joined: Jan 29, 2003
Posts: 8791
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.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Performance: Horizontal scalability or vertical scalabiltiy
 
Similar Threads
Horizontal scaling Vs Vertical scaling
Horizontal Clustering Vs Vertical Clustering
Doubt on the faults of 2-tier architecture!
Server Clustering issues
EJB scalability