-2

TL;DR;

Is there any technique that I can use to estimate the resources consumption of a web application? If yes, what sort of information do I need as input? Amount of users? Data types of fields to be persisted? How many transactions are expected?

More context: I have estimated the effort to develop a web application, lets say an E-Commerce APP (Product CRUD, Order CRUD, Payments...), now I need to estimate the resources that I will need to have this app up and running smoothly.

Example:

   16GB RAM
   4 Core CPU (3.0 GHz +)
   500GB PostgreSQL

How can I better estimate the values related to memory, disk and cpu?

Frankra
  • 133
  • 8
  • There's no objective way to answer this question, as the topic of load-testing is very broad (as is something like an eCommerce system - there's no single way to create such a system, and no single way to design the database). You'll need to do some testing on your own. Also, this isn't a programming question. Unfortunately, off-topic for StackOverflow. – David Makogon Oct 31 '17 at 11:58
  • @DavidMakogon, I am not mentioning load-testing, I talking about estimation the estimation of resource consumption for an Application that I have not yet developed (The e-Commerce is just an example..). Which regards to the relation of the question and programming, you even mention that it depends on the way I design the database or the application, which means that there is indeed relation to programming/design. What I am asking for, is: "If you would need to estimate the resources required for an app you have yet to develop, how would you do it? And why would you do it this way?". – Frankra Oct 31 '17 at 12:13
  • What I'm saying is, there's no answer to your question without testing for performance & load. And what I meant, regarding the database comment, was that different database schemas (or engines, or query patterns) will impact performance in some way, but again, no way to tell unless you do some testing. There's no magic formula to this. – David Makogon Oct 31 '17 at 12:15

1 Answers1

1

This is a very difficult thing to estimate. Personally, if I needed to come up with an estimate, I'd break it down into multipliers. Figure out the capacity needed for a single product, a single order, and a single user... Then multiply out. This is going to be very rough. As far as CPU speed, it's impossible to tell without load testing. Very small decisions can make a huge impact on processing / memory consumption. The decision to use an in-memory hash-table vs an on-disk database for key-value lookups could grow your memory consumption by orders of magnitude. Your choice of programming frameworks can also have a huge impact.

I could write an e-commerce system that runs on a Rasberry PI... Or one that requires several clusters of dozens of machines... It all depends on scaling factors, design factors, developer skill, implementation factors, etc.

Rob Conklin
  • 8,806
  • 1
  • 19
  • 23
  • That's what I was currently trying to do. Usually I design the whole thing, so I know what is the stack, frameworks and services that I need, but still, when it comes to CPU and Memory is quite rough to get the numbers on a "safer" way. Anyway, it was an answer like yours that I was expecting. Thanks – Frankra Nov 02 '17 at 13:13