• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

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

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 23923
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Bartender
Posts: 2907
150
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what factors tell me that i need more CPU/cores and RAM?
 
lowercase baba
Posts: 13053
67
Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.

 
Sheriff
Posts: 27228
87
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic