How to set the basic requirements for running Java desktop application?

2

How do I identify the minimum requirements (RAM, processor, etc.) for my application to run?

I do not have several computers to test with various situations. The computer I use for development has specifications a little above the "ordinary" computers, nothing so far up, but I believe the system does not need all that. I know it depends on the features, database, et., But is there any software or a hint so I can identify a minimum requirement for the system to run smoothly?

    
asked by anonymous 28.10.2016 / 14:08

1 answer

2

Note that there are two streams to specify the minimum. One of them is to use the same minimum even if it almost makes the application unusable. Another is a minimum that guarantees good use, usually in this case is usually exaggerated purposely.

The only right way is to test on multiple computers. In some cases it is possible to artificially limit some feature of a computer to simulate something inferior. But I do not know if it makes up for it.

Actually in practice it is rare to do this, especially in software that few people will use. What is done is to estimate the use. Many times it is just reproducing what Java already requires, perhaps with some time off.

You also need to see which operating system (including version) you need to use and other dependencies, including databases. It is not just processor and memory that requirement exists.

Desktop

Java runs on any minimally modern processor. You can adopt some arbitrary minimum limit. Type: Intel processor compatible with at least 2 (maybe even that) cores and / or 2.0Ghz.

Of course you can use some library that requires some specific feature of some processor. You have to see this with this library and adopt that need. That is, you have to know what you are using to specify what you need. Tests are not really needed. The other specification serves as the basis for your.

If there is any reason to require more, put, this should be obvious in the use of the application. Remembering that the minimum is not necessarily recommended for best use.

A common thing is to require it to be 64-bit in some cases. This is obvious if it will require more than 2GB of memory.

In theory, most Java applications require a few megabytes of memory. So nothing prevents from saying that the minimum is 1GB, since the operating system should require this (Linux without GUI may require less, mobile as well). Of course the ideal is to take a break, so it's usually 2GB. If you want to give a quieter experience may require 4GB.

If the application is memory-hogging it may be useful to require more, there are extreme cases that may require 32, 64 or more gigabytes. If you do not know that the application devours memory like this, the least of your problems is specifying the requirement, you probably have no idea what you're doing and it's very dangerous.

Some people speak in memory only for the application. In this case you can try to run your application for a long time and see in the tool that monitors the memory in the operating system the peak it gave. No need, but give an idea, put some time off and spread it. You can also run a little bit and see how much you've done by doing almost nothing. It gives a low minimum, but it is deceptive (there are people who do this).

Ideally it would be useful to use a profiling tool, but not knowing what to do with it is no use. One way to monitor it is like what Edson F. Santos posted in the comment above.

Memory is never too much until the pocket claims strong or is obviously exaggerated. Today has desktop running at 32GB or more, is exaggerated for some cases, but not for everyone. 8GB should be the least of any desktop.

Server

Here the thing gets more complicated. I will not even talk about whether the server shares a database.

In general a server can be no small thing, if it is much lower than the need will run, then it may even specify something like a desktop, but the experience will be pretty bad.

Outside you have experience with many cases, which does not seem to be the situation, just measuring it even though the measurement is not perfect, it gives a foundation. It is to rotate within the expected load and see how it behaves, see if the processor is beating at 100% for a long time, if it gets swap at "disk", all this is a warning sign. / p>

It is common to need multiple cores on the server to respond well, but it depends on the load. Even minimum, anything serves. And it has application that having multiple cores will not help anything, but there maybe it's an application problem.

Server tends to need more memory. But it may also be more necessary for the database.

If the application is cache-intensive, it will run with a minimal bare minimum, but it will be much better if you have enough cache memory.

If you want more accurate information, there's no way, you'll have to be good at profilling .

Mobile devices and specialized use

There you should not have much control. The most common is to have the application fit into what it has available in the thick of the market.

Conclusion

Remember that the application changes and the minimum can change. A simple addition of something that needs to load something big in memory can change everything.

    
28.10.2016 / 14:59