• Post Reply Bookmark Topic Watch Topic
  • New Topic

what does it mean having more CPU and RAM in java world

 
Sireesh Ganagam
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have question , let say if i have to run 1000 java threads ? what i need interms of CPU and RAM. ? what does CPU and RAM helps interms of creating java threads?

why can't we scale a server with 100 cpu and 100 TB RAM ? am i sound crazy but yet i want to know the limitations.
 
Henry Wong
author
Sheriff
Posts: 22528
109
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sireesh Ganagam wrote:
why can't we scale a server with 100 cpu and 100 TB RAM ? am i sound crazy but yet i want to know the limitations.


You have to scale a server based on the scarce resource. If your application is mostly waiting for data, either via the network or slow disks, because they are not fast enough, then it doesn't matter if you add more threads, more cpu, or more memory. If the application can't keep 10 cpus and 1 GB of memory busy due to a scarce resource, how is it going to keep 100 cpus and 100 TB busy?

You need to confirm that either the CPU or the memory is a scarce resource before considering adding to it.

Henry
 
Sireesh Ganagam
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Henry for your response.

On what factors i have to decide increasing CPU and RAM . If i have application that needs to run with 1000 threads? how do i decide how many CPU and RAM it need?
 
salvin francis
Bartender
Posts: 1407
18
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sireesh Ganagam wrote: If i have application that needs to run with 1000 threads? how do i decide how many CPU and RAM it need?


I think you have misunderstood what Henry said. The general consensus is that more CPU means a faster processing and more RAM means greater memory to utilize to load content.
However, Disk/IO/Networks are speed limiters here. You need to first assess what those 1000 threads are actually doing. You can monitor CPU/TCPIP connections/Disk usage, etc.. and get the metrics as to what is saturated and then take a decision over the upgrade.
 
Sireesh Ganagam
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what factors tell me that i need more CPU/cores and RAM?
 
fred rosenberger
lowercase baba
Bartender
Posts: 12341
38
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sireesh Ganagam wrote:what factors tell me that i need more CPU/cores and RAM?

if your CPUs are all 100% utilized all the time, you need more CPUs.
If you have maxed out your memory, then you need more memory.

 
Paul Clapham
Sheriff
Posts: 21876
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sireesh Ganagam wrote:If i have application that needs to run with 1000 threads?


I think you have confused business requirements with implementation details. So let's start at the beginning... you seem to have fixed on an implementation which uses 1000 threads. Now, no application actually needs 1000 threads -- there are many ways to get things done in an apparently simultaneous way. So what's your business requirement which you have decided to implement with all those threads?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!