I have successfully deployed a java service onto a Linux distribution based on the guide here i.e. the actual simple file IO tick-tock code, and am noticing high CPU usage for such a simple program. Perhaps due to the thread constantly checking...
I have built the actual JAR file on CentOS using NetBeans and then deployed onto Arch Linux ARM distribution, and then using a) Oracle's Java SE Embedded JVM (v7) and b) java-7-openjdk JVM.
The issue is that CPU usage is constantly rocking between 80 and 95% by jsvc. I wouldn't expect the CPU to go that high. In the actual jsvc call I tried adding the -server parameter for background process - but did not manage to (I get . An example for this would be helpful so that we can rule out whether it is the missing -server parameter or not.
I think I may be missing something apart from the -server option. I've been told to look at ScheduledExecutorService - which can make an improvement perhaps?
Your thoughts are appreciated - Thanks.