Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

Thanks.

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

2 Answers 2

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: http://www.markround.com/archives/48-Linux-iostat-monitoring-with-Cacti.html 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

 
discard

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.