Giter Site home page Giter Site logo

perfios's Introduction

Perfios Test

The docs/processRing.pdf has the problem statement.

The src folder has the source file and class file too.

How to run the code

$ git clone https://github.com/chethanrepo/perfios.git

$ cd /src

$ java com/perfios/test/ProcessRing 10 5

** Note: You can try verious inputs range (int) with two args[] **

Q & A

What is a good way to send messages between threads? What mechanism would you use and why?

  • Typically, wait(), notify() & notifyall() methods are used to communicate between threads with our own locking mechanism, In order to process the tasks or messages more efficiently, producer consumer mechanism with backup option(writing a copy to disk or db) would be reliable way to process the message(s). *

Try to find the limits - what is the maximum number of threads you can create in your machine? What is the maximum N * M value supported by your machine?

  • The jvm version(32 bit or 64 bit), memory & data that is being processed has the control over number of threads being created inside jvm. My system had 64bit jvm, single core processor and 8GB RAM, I was able to create upto 100000 (1 lakhs thread) with almost 94% of memory. The single round trip with 100000 threads took 19 secs,(100% cpu usage in the beginning), that means I can have 100k threads without any issue provided message size is less. The number of round trip should not be problem when we have a sufficient memory to create threds, 16GB ram we can have 200k threads. In order to increase the number of threads in the jvm, Increase memory. I have attached screenshot when 100000 was the input, you can see 100k + threads under threads section in the screenshot. The maximum capacity on my laptop is 100000 * [int range] - may take many hrs to test the same *

alt text

perfios's People

Contributors

chethanrepo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.