As soon as I start a Spring Boot 2.2 application from Eclipse on my Windows 10 Laptop I notice around 10% of permanent CPU usage, and the clock freq. is also barely below 2 GHz, even if the application is sitting there idle.
When I stop the application, cpu usage drops to 1-2%, and the clock goes below 1 GHz.
The application does one sql query every minute, but apart of that does no processing while idle. It basically sits there waiting for requests.
How can I figure out what is causing this usage which seems to prevent the cpu (i7-5600U with 8GB ram) throttling down?
I use Java 1.8.0_221.
Edit 1
I tried running the compiled jar from cmd.exe, and then the idle cpu usage is low.
Edit 2
I tried disabling spring-boot-devtools in my pom.xml, and the idle cpu usage is low as well.
Edit 3
This is probably the issue: https://github.com/spring-projects/spring-boot/issues/9882 It feels like a FileWatcher is set up even for excluded folders and files, which in my case is bower_components with thousands of files.
Related
I am using Xcode 9 and my SourceKitService using more than 5 GB memory. Due to it my system become very slower.
Every time, I have to force quite this service from activity monitor to come back to normal situation. A few minutes back this service appears again and start using my memory resources.
Any help about it.
Same problem here. AFAIK there's no workaround, other than kill the process.
I tested my app with WACK and I got the following result. How can I solve these two warnings, and can I put my app in the AppStore?
------------------------------------------------------------------
Overall Score: PASSED WITH WARNINGS
Launch time performance
WARNING
Performance Launch
Warning: Following results were encountered while running the Performance Launch test.
Application App has a launch time of 0.971 secs.
Application App has CPU utilization of 12.15 percent. CPU utilization of 50 percent or higher can significantly degrade performance for Application Launch/Suspend.
Application App allocates process private memory of 0 MB. Process private memory usage of greater than 25 MB can significantly degrade performance for Application Launch/Suspend.
Application App issues File I/O of 0.722 MB. Issuing File I/O of 50 MB or higher can significantly degrade performance for Application Launch/Suspend.
Impact if not fixed: Application launch is your customer’s first experience and impression of your Metro style application. To ensure system responsiveness applications are expected to launch within 5 seconds. Windows 8 is targeted at a broad range of hardware configurations and this launch time target is intended to provide a good baseline of performance across the broadest range of hardware capabilities. It is important to understand the launch performance of your application, while taking hardware capabilities into consideration. If your application has passed this test locally but has launch times which are close to the required limits, consider what type of hardware this test is being executed on as your application could potentially fail the Windows Store certification process. Reducing resource utilization can reduce the duration of launch, especially when contention for resources is high.
How to fix: Additional information can be found here.
Suspend performance
WARNING
Performance Suspend
Warning: Following results were encountered while running the Performance Suspend test.
Application App has a suspend time of 0.005 secs.
Application App has CPU utilization of 9.11 percent. CPU utilization of 50 percent or higher can significantly degrade performance for Application Launch/Suspend.
Application App issues File I/O of 0 MB. Issuing File I/O of 20 MB or higher can significantly degrade performance for Application Launch/Suspend.
Impact if not fixed: In the Metro style user experience, Application suspend is a very frequent occurrence. To ensure fast and fluid multitasking, applications are expected to suspend within 2 seconds. Windows 8 is targeted at a broad range of hardware configurations and this suspend time target is intended to provide a good baseline of performance across the broadest range of hardware capabilities. It is important to understand the suspend performance of your application, while taking hardware capabilities into consideration. If your application has passed this test locally but has suspend times which are close to the required limits, consider what type of hardware this test is being executed on as your application could potentially fail the Windows Store certification process. Reducing resource utilization during can improve the duration of suspend, especially when contention for resources is high.
How to fix: Additional information can be found here.
Every app gets those warnings in Consumer Preview, as they are used to report the startup and suspend times. You'll see that your numbers are well below the threshold of concern. These warnings won't cause a problem with the Store--every app you see in the Store today got those warnings too.
At work we are using some pretty powerful machines: HP Z600 with dual xeon #2.5GHz, 8-16GB ram. Unfortunately due to ill-fitting company policies we are forced to use 32-bit XP, so I made a PAE ramdrive out of the unused 4GB RAM.
Now, the temporary files are on the ramdrive. I've also tried moving the whole project to the ramdrive, then to an SSD, but there was no noticeable improvement in hosted-mode startup or compilation times.
I've then run SysInternals' Process Monitor to see if there are any bottlenecks that are not visible with task manager / hard-disk activity led, but I have not seen anything notable - except some buffer overflows which I don't understand what they mean.
I can assume that performance for OOMPH startup and GWT compilation are tied so I'm using the compilation times as benchmarking between various changes.
I've activated and deactivated hyper-threading and turbo-boost in BIOS, but again saw no differences. Hyperthreading even seems to make everything slower, I can assume that context switching penalty is higher for 16 cores than for 8 cores. Turbo-boost does not seem to do anything, I can assume it only works under Win7, I have not succeeded in activating the driver. It should boost the core from 2.5Ghz to 2.8Ghz.
Deactivated indexing and timestamping on NTFS drives, changed the performance setting from foreground to background and back, used another instance of Eclipse - no changes.
For compilation I've tried specifying a different number of workers, larger memory and some other options. Everything above two workers increases compilation time.
Older HP machines (XW6600) seem to compile a bit faster, perhaps because of the 2.8GHz clock, but their hosted mode seems to start up slower.
To sum up, memory usage is at about 2.6GB, pagefile usage is zero, harddrive is not signaling much activity, CPU activity is <10% (single core at about 50-70%) but still the computer seems to do nothing for some time while compiling or launching OOMPH GWT.
Ok, so now that I've tried everything I knew and found on the Internet, is there anything else that I can try? Will switching to 64-bit Win7 improve much (this is due next year anyway)? Are there any hardware/software options that I can tweak?
L.E.: also ran RATT (tracer from MS) to see if there are any interrupts taking too long, but everything seems in order. Antivirus does not make a difference. Benchmarked another GWT project against my i7 mobile (2630q) and the i7 is about 70% faster, though it has about the same clock.
In most cases I've encountered the reason for slow compilation/hosted mode refresh is that application is written this way.
For compilation there are few things to watch out for:
Don't keep unused classes and modules in your classpath, remove them if possible because GWT is parsing them anyway at precompile stage
whatch out for GWT-RPC type explosion, this is usually a cause of all problems
Be really carefull with interface ContextWithLokup, always try to minimize the number of methods used in interface which extends ContextWithLookup
Try to check out some other compilation options, like distributed compilation , soft permutations or multi-jvm compilation (run compiler with system property -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ExternalPermutationWorkerFactory and -localWorkers to specify number of JVMs)
For hosted mode:
Use lazy loading where it is possible. The greatest problem with hosted mode i saw, i that application is trying to initialize too many classes which aren't even used on current screen, this can greatly speedup a hosted mode startup. Again, stuff like RPC type explosion affects hosted mode as well
That's all I can advise. Stuff like ram disk can speed up stuff like -compileReport, since it can generate a huge number of files.
In a nutshell: my JBoss instance is running ok, but after some days it's performance is slowly degrading.
Detailed:
I've got a setup with JBoss 5.1.0-GA and Java 1.6.0_18-b07 (x64) running on a 64 bits RHEL 4 box. The hardware is a virtual machine with 8 core Xeon X5550 / 20G ram.
The product deployed in JBoss contains a webservice on which a endurance test is performed.
No database is involved in the process.
The tests are performed using soapui with 4 threads and the tests are configured to create 20% cpu usage.
Let say, at first the average response times are 300ms. After 2 days, the response times are now 600ms, which I don't understand.
Of course I did some checks:
There are no memory leaks (confirmed with jprofiler)
Heap mem is always around 25-50%, perm space usage is 50%
GC is almost never busy
All threads are idle after inspecting a thread dump
While do some further investigations, I did a cpu profile with JProfiler at the beginning (when it's still fast), and on on the (slow) end. What I see then, is that every single call just is 100% slower!
Even call's to a simple Map#put(). (the # of invocations and the content of these maps are the same).
When running a profiler, there are no signs of blocked threads, just running threads.
Does anyone has a clue what's causing the performance degradation?
Thanks!
Update: solved the performance degradation by upgrading the Java version to 1.6.0_24 !
While out of options, I scanned through all the release notes of the java vm, and discovered a performance and reliability fix in 1.6.0_23. See also the
1.6.0_23 release notes
After the jvm upgrade, the performance stays the same and does not degrade over days.
Solution found by Jan :
Solved the performance degradation by upgrading the Java version to 1.6.0_24 !
While out of options, I scanned through all the release notes of the java vm, and discovered a performance and reliability fix in 1.6.0_23. See also the 1.6.0_23 release notes
After the jvm upgrade, the performance stays the same and does not degrade over days.*
My customer complain that our window desktop application slow down sometimes. I don't see any strange in the my application log file. So I think that the CPU may be used by another application. So, is there any way (or tool) to track high CPU usage on client machine?
Thanks,
you can use the tool Performance monitor for the windows server.
You can track various processes CPU utilization (Processor time etc). This way you could track on your processes particularly and can get CPU utilization for your processes.
http://technet.microsoft.com/en-us/library/cc749115.aspx