#SQL TOOLS FOR POSTGRESQL FREE#
The "free" value beside "-/+ buffers/cache" is the one you should generally consider the "real" amount of free memory in the system. After all, truly free memory is wasted memory that does you no good. The kernel will use most of the free memory for disk cache, but will shrink that cache as required to fit other things into memory. The real memory in use is actually (roughly) the value in "used" minus the value in "buffers", since "buffers" includes the kernel's disk cache. Quite configurable.ĭon't be fooled by the "used" and "free" memory values. Like vmstat, gives you some system overview info, though isn't as useful for disk information. It's most useful when updating continuously, eg: Vmstat can give you useful overview information about CPU, disk and memory activity at a system wide level. You'll need to go digging in the kernel sources, use Google, or nut it out to figure what the value shown in the wchan field means. Ps -e -o pid,ppid,wchan:60,cmd | grep post The "wchan" option is really useful for seeing what a process that's in 'D' state (uninterruptable sleep in kernel system call) is actually doing.
#SQL TOOLS FOR POSTGRESQL WINDOWS#
Windows users will want to look into Process Monitor, Process Explorer, and FileMon from the SysInternals suite. PostgreSQL has DTrace hooks to allow you to investigate its internal workings and performance as well as that of the operating system it is running on. On supported systems (currently Solaris and FreeBSD), `dtrace' is also a powerful tool. Tools like `ps' with the `wchan' format specifier, `vmstat', `top', `iotop', `blktrace' + `blkparse', `btrace', `sar', alt-sysrq-t, etc can help you learn much more about what your system is doing and where things are being delayed. System level tools for I/O, CPU and memory usage investigation If you're at a loss, see SlowQueryQuestions. You can find a lot of advice about tuning PostgreSQL and the system in the Performance and categories of the wiki, and in the PostgreSQL manual. The pg_catalog.pg_stat_activity and pg_catalog.pg_locks views are also vital. The most important tool in your toolbox is the SQL EXPLAIN command and its EXPLAIN ANALYZE alternative. Most of the time, the tools PostgreSQL provides internally will be more than adequate for your needs. This page is focused on tools for collecting data outside of PostgreSQL, in order to learn more about the system as a whole, about PostgreSQL's use of system resources, about things that may be bottlenecks for PostgreSQL's performance, etc. 1.6.3 Postgres EXPLAIN Visualiser 2 (Pev2).1.6.2 Postgres EXPLAIN Visualiser (Pev).1.5 PostgreSQL-centric performance tools.1.1 System level tools for I/O, CPU and memory usage investigation.