We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com



I have two m3 large Windows servers

I am running only one request on one server of converting a 26 KB doc file into pdfthe conversion results in around 90 percent or more usage of my CPU

Why is that?

more what are the specs of server needed for concurrent 300 users using the Aspose library

and what is the maximum file size

moreover Does temp license creating problem>>

This is my code for converting to Pdf

public String Conv(InputStream in, String appenduserid,String authentication, PrintParams printJO, String serveraddr, String ext, String check) throws Exception

// Taking the input file stream from connection and forming Document Object
com.aspose.words.Document Doc = new com.aspose.words.Document( in );

// Initializing a new OutputStream for saving the changed file
ByteArrayOutputStream dstStream = new ByteArrayOutputStream();

// Saving the changed file in PDf Format
Doc.save(dstStream, com.aspose.words.SaveFormat.PDF);
System.out.println(" JAVA Save CHECK 2 ");

//Getting the response path of the uploaded input stream on the s3 module
String ResponsePath = Conversion.uploadPDFCheck(dstStream,authentication,appenduserid,serveraddr);
System.out.println("Success"); //Temporary
return ResponsePath;

There can be pdf, slides, html, cells etc types of documents…
All the codes are very similar.

Hi Hafsa,

As discussed on live support, can you please also attach your input documents/samples to reproduce the issue?

Best Regards,

This is just one doc, but as i said. i have tried with every doc on my m3 large server

Hi Hafsa,

Sorry, I was not able to reproduce the issue on a Windows 8 virtual machine with JDK 1.7. Can you please share how much memory it takes if you convert the same documents in a single thread on your local system (other than M3 server)?

Best Regards,

I have again tried the library on my M3 server where there is only single word file and i am just converting the file into pdf using your simplest code.
The code is

com.aspose.words.Document Doc = new com.aspose.words.Document( filepath + “Bigdoc.doc”);
Doc.save(filepath + “New.pdf”, com.aspose.words.SaveFormat.PDF);

The 2 MB file is attached. I have tried for many files and i am attaching one. More around 40% of CPU usage is seen in the file loading into Doc and 90 above % is seen in Doc pdf saving process.

On the local it almost uses 30 % of the CPU processing for each a single file conversion. More increases the memory of CPU occupied by the Java service by average 100Kb or more with each conversion done.

Hi Hafsa,

Can you please share how are you monitoring the CPU usage? Are you using a Java profiler? I used JVM Monitor for Eclipse at my end and did not see this issue. CPU usage was always less than 5% for conversion thread.

Can you please also test a simple Java application at your end without using Aspose and check if the CPU usage is still the same or it is less?

Best Regards,

I am monitoring the CPU usage on my task manager processes of the java service that i am running through my project jar file.
I have also tested a simple application without aspose functions on my PC and matched with another PC, the CPU usage is very normal. so nothing is wrong with my PC.

More i have made a project pretty simple with just nothing else than the conversion of a single file through aspose words 14.12.0 for jdk-16 and it gives me the CPU high usage issue.

public class Test
public static void main(String[] args) throws Exception
com.aspose.words.License license3 = new com.aspose.words.License();
license3.setLicense( Test.class.getResourceAsStream(“Aspose.Total.Java.lic”));

System.out.println(“Document Load Start”);
com.aspose.words.Document Doc = new com.aspose.words.Document( “C:/Users/himran/Documents/” + “Bigdoc.doc” );
System.out.println(“Document Load END”);

System.out.println(“Document Save Start”);
Doc.save(“C:/Users/himran/Documents/” + “New.pdf”, com.aspose.words.SaveFormat.PDF);
System.out.println(“Document Save END”);



Hi Hafsa,

14.12.0 is an older version. Can you please also test with the latest one (i.e. 15.7.0)?

Best Regards,

I have tried it with the latest version too and CPU usage is still very high. no change.

What can be the cause?

i have tried with the latest version on another system too. But still the same result.

Hi Hafsa,

We are further investigating the issue and will update you soon.

Best Regards,

It is very crucial for us,

update me soon

Hi Hafsa,

The issue has been logged into our issue tracking system as WORDSJAVA-1131. As this issue has recently been logged and has not been analyzed yet, we will not be able to share any update right now.

We will share more details once the issue has been analyzed by our product team. Sorry for the inconvenience.

Best Regards,

This issue is pretty crucial for us and is delaying our project.
Any update related to it?

Hi Hafsa,

Aspose.Words' code contains many CPU-bound operations and few IO-bound operations. CPU time is allocated by OS and we cannot affect scheduler. It looks like Windows 8 strives to saturate(load) CPU as much as possible to perform given task faster because there is no such issue with other operating systems.

We can optimize running time or memory consumption, but not the CPU usage. Running time will be optimized in next release and you will see slight reduction in CPU usage because of that but there will not be a drastic change in CPU usage as far as Windows 8 is concerned.

We are sorry for the inconvenience.

Best Regards,


It is not only a Windows 8 issue, i have also tried it on Windows 7 and the CPU usage is still that high.
I have also tried on other Computers with Windows 7 else than mine and the issue is still there.


Hi Hafsa,

I tested at my end with Java 6, 7 and 8 on Windows 7 and CPU usage increases from 30-40% which is much lower than the Windows 8. I tested by sending 1000 conversion calls in a loop and CPU usage always remained lower than 50%.

Best Regards,