1 of 1 people found this helpful
>>What can be done to solve this problem.
Don't run the processes? ;-)
I would modify the processes to not use 100% of the CPU. Without knowing anything about these processes (what they do, what they are written in, if you have the source, how they are configured), it is hard to give more specific advice. If you have multiple CPUs on your machine, you could set affinity such that the processes get only a single CPU, that way they won't take up the whole machine.
>>What is the ideal hardware requirement for servers that get about 300-500 traffic in a day.
300 to 500 requests per day? Of did you mean per minute/hour?
It all depends on what each request is doing. If each request is to index the entire internet, then your box is woefully underpowered. If each reqeust is a simple "hello world" echo, then you should be able to get 500 requests per second. Since you did not provide any information about what the resusts do, or the different types of requests you have, nor of the processing requirements for each request type, I can't provide any more detailed information than that.
These process mostly opens the database connection to query them. Query language that is used is HQL. This process must be run in order for us to use (do things in) admistration site . Giving it all the CPU it takes usually 10-15 (sometime more) mins to finish if we give it less CPU I think that would make application dis functional.
In busy days server gets restarted 3-4 times too.
300-400 customers a day. Most request are for webpages. To view their account summary or sign ups for service.
Is it a good idea to have database and jboss as in different machine for better performance.
If any info is needed let me know.
1 of 1 people found this helpful
Sounds like the app was poorly designed; a complete redesign is in order.
Oh, the 300-500 was users not requests. Go figure! But even if you had a million users, you could still handle that load if users rarely made requests. But even with say 300 users, if each made a request every minute, that would be only 5 requests per second, which should be doable. But that all depends on how processor and database intensive each request is.
>>Is it a good idea to have database and jboss as in different machine for better performance.
That all depends. When the CPU hits 100%, have you noticed that is using the CPU? If tha database is use 90% and leaving 10% for the app server, and if every user request needs database access, then moving the database to another system migth not help all that much. The other system will then run at 100% CPU while the two processes are running, so still for that 10-15 minutes you will have the app server waiting for responses from the database server which is already overloaded.
What have you done to monitor the system to identify the bottleneck? How familiar are you with performance tuning? Tuning not just the JVM, but the entire system (OS, network, JVM, apps, database, etc). The thing is, performance tuning is very much a black art and is difficult to do using a forum as a communications mechanism (). If you are not comfortable with, or don't know how to do performance tuning, you need to hire a performance expert who can evaluate your entire system and make recommendations.
I don't know how to do perfomance tuning. Any particular books you suggest to read.
Before when this application was hosted in different server things were fine and when it got moved to this new server things just slowed down.
So thought It might be something to do with server so may be we upgrade and things would be fine but looks like thats not what is going to happen.
Thank you for your help.
Good starting points will be different oracle pages:
Books are available from i.e. from O'Reilly or safari-books online.
'Java Enterprise performance' is also advisable (but I don't know ATM whether it is available in English).
You might also read the articles of Peter Johnson here http://www.cmg.org/cgi-bin/search.cgi?q=java+peter+johnson&x=30&y=10
Thank you very much for that.
I found out that the way our application works is customers are never deactivated and when we run a one particular task it looks for all active customer and then find their inventory items and try to change the status of each item. Right now, new logic deactivates customers
if they are finished using the service. This is for now solution only.
Thank you again
If you are satisfied you should mark the thread as answered