I start tomcat using startup.bat and do nothing more with it. It is a plain vanilla installation (Version 7.0.47), as far as I know. When connecting with a JMX tool, like VisualVM I see the usage of Heap space constantly increasing. Until some garbage collection happens. And then it starts all over, again. Why is that so? What is tomcat
Tag: performance
What JVM optimization is causing these performance results? [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 8 years ago. Improve this question In a Java REST service performance test, I got an unexpected pattern: a method that creates and returns always the same value object in each
Java 8’s streams: why parallel stream is slower?
I am playing with Java 8’s streams and cannot understand the performance results I am getting. I have 2 core CPU (Intel i73520M), Windows 8 x64, and 64-bit Java 8 update 5. I am doing simple map over …
The Running Time For Arrays.Sort Method in Java
Does anyone know the running time in big O notation for the arrays.sort java method? I need this for my science fair project. Answer From official docs I’ve observed that there are primarily two approaches. So, it depends on what you are sorting and what overloaded method from sort family of methods you are calling. Docs mention that for primitive
Calculate average of a huge long array
I’m trying to calculate the average of many (more than 200) long (primitive type) values stored in an array. Usually you add all the numbers and divide it by the number of the values. But this is not possible in this case since there is no primitive datatype in Java capable of holding such a large number, isn’t it? Will
(int) Math.sqrt(n) much slower than (int) Math.floor(Math.sqrt(n))
I was looking at my code, hoping to improve its performance and then i saw this: Oh, ok, i don’t really need the call to Math.floor, as casting the double returned from Math.sqrt(n) will be effectively flooring the number too (as sqrt will never return a negative number). So i went and dropped the call to Math.floor: sat back and
Java Virtual Machine Heap Tuning Parameters
What would be the effect of setting only -Xms without setting a -Xmx for eg. java -Xms 2048m ? Does setting a high lower value for -Xms mean lesser Heap Fragmentation? Answer Setting -Xms to the estimated heap requirement of your application will speed up start of your application (of course Xms must be <= Xmx). Reason is the VM
Java collections faster than c++ containers?
I was reading the comments on this answer and I saw this quote. Object instantiation and object-oriented features are blazing fast to use (faster than C++ in many cases) because they’re designed in from the beginning. and Collections are fast. Standard Java beats standard C/C++ in this area, even for most optimized C code. One user (with really high rep
Java GC overhead limit exceeded – Custom solution needed
I am evaluating different data from a textfile in a rather large algorithm. If the text file contains more than datapoints (the minimum I need is sth. like 1.3 million datapoints) it gives the following error: When I’m running it in Eclipse with the following settings for the installed jre6 (standard VM): Note that it works fine if I only
Python very slow as compared to Java for this algorithm
I’m studying algorithms and decided to port the Java Programs from the textbook to Python, since I dislike the Java overhead, especially for small programs, and as an exercise. The algorithm itself …