Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a server which is running a few discrete Python, Java application which most of the time imports data into a PostGreSQL database. I would like to know from people out there who have experience tuning enterprise grade servers how do i go about calculating in a holistic way the amount of tuning needed for my server for example vm.swappiness, vm.overcommit_ratio and other numerical tunings needed for my server.

I tried to enable sar on my server to capture daily numbers but these are more along the lines of total numbers and I can't figure out how to allocate memory for my applications. Help would be appreciated.


share|improve this question
If it were a simple formula then someone would have written a program to do it automatically - in practice its mostly empirical - but you do need data to base this on - and targets/objectives (e.g. html page generation time). The standard system metrics can give an indication of how performance is constrained - but not necessarily how to improve it. – symcbean Feb 3 '11 at 9:40
I suggest you stop looking at the problem as an accountant and look at it as an administrator. Performance tuning is not about arithmetic and many of the factors cannot be readily interpreted numerically. Server administration, like many other things related to computers, is not a science, it's an art. – John Gardeniers Feb 3 '11 at 12:42

First, determine the bottleneck in the system(slow PostgreSQL query, slow IO, slowly working scripts). Then use standard monitoring tools(top,htop,iostat,vmstat,pgtop,iotop) to determine a cause. Further, you find a solution(pgtune,kernel parameter,mount option,java vm option,rewrite source code).

share|improve this answer

You should install some kind of monitoring tool to get statistics. The best way to analyze the statistics is to get visual graphs of monitored parameters, I think. Cacti or Zabbix will provide you with these graphs. Most probably your system is I/O bound or memory bound, so you should start from monitoring your memory usage, swap file usage, I/O statistics and load average on a host. Cacti has a good set of templates to monitor I/O stats: Also, it would be useful to get a list of slow SQL queries, you can do it by setting something like log_min_duration_statement = 200 in postgresql.conf, where 200 is a desired number of milliseconds, you can use any other number as well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.