• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

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

 
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.
 
author
Posts: 23887
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux 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?
 
Saloon Keeper
Posts: 2741
133
Google Web Toolkit Eclipse IDE 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?
 
lowercase baba
Posts: 12935
65
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.

 
Marshal
Posts: 26135
77
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?
 
"I know this defies the law of gravity... but I never studied law." -B. Bunny Defiant tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic