Balancing thread usage of CPU/memory resources on Java J2EE server
I am developing a website/online-service for document collaboration that runs on JBoss. During testing on a Linux machine with 2.5Ghz cpu and 2GB RAM the page response is very fast and we are considering to launch with this machine.

The problem arises during document processing. After a user uploads a document a new thread is started that among other things converts the document, extracts text and images from the document and uploads the document through https on another server. A user can upload many documents at once and the threads for processing them work concurrently. Until this processing finishes the website becomes almost unresponsive.

Can you give me some advice on how I could somehow allocate a percentage of CPU/memory (e.g. 40% max) on the threads that process the documents? If this is not possible, please advise me on a methodology/pattern that will somehow share the load on the machine between JBoss responding to page requests and the threads that process the documents.

Regards
Balancing thread usage of CPU/memory resources on Java J2EE server
===

I am developing a website/online-service for document collaboration that runs on JBoss. During testing on a Linux machine with 2.5Ghz cpu and 2GB RAM the page response is very fast and we are considering to launch with this machine.

The problem arises during document processing. After a user uploads a document a new thread is started that among other things converts the document, extracts text and images from the document and uploads the document through https on another server. A user can upload many documents at once and the threads for processing them work concurrently. Until this processing finishes the website becomes almost unresponsive.

Can you give me some advice on how I could somehow allocate a percentage of CPU/memory (e.g. 40% max) on the threads that process the documents? If this is not possible, please advise me on a methodology/pattern that will somehow share the load on the machine between JBoss responding to page requests and the threads that process the documents.

Regards