gf=# SELECT r.relname, l."mode", count(*) AS numlocks FROM pg_locks l, pg_class r WHERE r.oid = l.relation GROUP BY r.relname, l."mode" ORDER BY count(*) DESC; relname | mode | numlocks ----------------------------------+-----------------+---------- threads | AccessShareLock | 63 threads_ix_nuked_lastpost | AccessShareLock | 47 threads_ix_nuked_gameid_lastpost | AccessShareLock | 7 pg_class | AccessShareLock | 5 pg_opclass_am_name_nsp_index | AccessShareLock | 3 pg_opclass | AccessShareLock | 3 pg_class_oid_index | AccessShareLock | 3 pg_type | AccessShareLock | 2 pg_statistic | AccessShareLock | 2 pg_attribute | AccessShareLock | 2 pg_amop_opc_strategy_index | AccessShareLock | 2 pg_attrdef | AccessShareLock | 2 pg_trigger_tgrelid_tgname_index | AccessShareLock | 2 pg_trigger | AccessShareLock | 2 users | AccessShareLock | 2 pg_statistic_relid_att_index | AccessShareLock | 2 pg_type_oid_index | AccessShareLock | 2 pg_amop | AccessShareLock | 2 pg_attribute_relid_attnum_index | AccessShareLock | 2 comments | AccessShareLock | 2 pg_shadow | AccessShareLock | 2 acls | AccessShareLock | 1 pg_index_indexrelid_index | AccessShareLock | 1 pg_attrdef_adrelid_adnum_index | AccessShareLock | 1 surveyresults_ix_userid | AccessShareLock | 1 pg_cast | AccessShareLock | 1 pg_shadow_usesysid_index | AccessShareLock | 1 pg_index | AccessShareLock | 1 games | AccessShareLock | 1 usersessions | AccessShareLock | 1 surveyoptions | AccessShareLock | 1 countries | AccessShareLock | 1 surveyresults | AccessShareLock | 1 vopenlocks | AccessShareLock | 1 pg_class_relname_nsp_index | AccessShareLock | 1 pg_namespace | AccessShareLock | 1 pg_database | AccessShareLock | 1 surveys | AccessShareLock | 1 pg_namespace_nspname_index | AccessShareLock | 1 community | AccessShareLock | 1 surveygroups | AccessShareLock | 1 pg_cast_source_target_index | AccessShareLock | 1 pg_locks | AccessShareLock | 1 pg_shadow_usename_index | AccessShareLock | 1 (44 rows) last pid: 27021; load averages: 9.73, 3.68, 1.93 up 19+22:06:45 14:26:53 102 processes: 27 running, 47 sleeping, 28 lock CPU states: 16.5% user, 0.0% nice, 14.3% system, 0.4% interrupt, 68.8% idle Mem: 95M Active, 1443M Inact, 190M Wired, 94M Cache, 112M Buf, 101M Free Swap: 4096M Total, 4096M Free PID USERNAME PRI NICE SIZE RES STATE C TIME WCPU CPU COMMAND 50557 pgsql 76 0 95276K 4860K select 0 24:33 1.03% 1.03% postgres 26968 pgsql -4 0 96356K 50828K semwai 0 0:00 1.08% 0.20% postgres 26992 pgsql 129 0 96048K 28616K *Giant 0 0:00 2.05% 0.20% postgres 26983 pgsql 127 0 96048K 21800K RUN 3 0:00 1.40% 0.20% postgres 26924 pgsql -4 0 96848K 38912K semwai 2 0:00 0.56% 0.15% postgres 26916 pgsql -4 0 96232K 40876K semwai 0 0:00 0.50% 0.15% postgres 26957 pgsql 126 0 96048K 32544K RUN 2 0:00 0.81% 0.15% postgres 26949 pgsql 125 0 96048K 32796K RUN 1 0:00 0.66% 0.15% postgres 26979 pgsql 128 0 96048K 35240K RUN 0 0:00 1.05% 0.15% postgres 26950 pgsql 126 0 96048K 29676K RUN 1 0:00 0.81% 0.15% postgres 26984 pgsql -4 0 96320K 12100K semwai 0 0:00 1.05% 0.15% postgres 50562 pgsql 76 0 6584K 4724K select 0 14:17 0.10% 0.10% postgres 26921 pgsql 4 0 96984K 58516K sbwait 1 0:00 0.38% 0.10% postgres 26911 pgsql 122 0 96984K 52856K RUN 1 0:00 0.33% 0.10% postgres 26946 pgsql 125 0 96904K 50328K RUN 1 0:00 0.44% 0.10% postgres 26913 pgsql -4 0 96984K 50536K semwai 0 0:00 0.33% 0.10% postgres 26908 pgsql -4 0 96272K 34812K semwai 0 0:00 0.30% 0.10% postgres 26965 pgsql 126 0 97028K 45736K RUN 0 0:00 0.54% 0.10% postgres 26926 pgsql -4 0 96376K 33628K semwai 0 0:00 0.38% 0.10% postgres 26944 pgsql -4 0 96228K 43220K semwai 3 0:00 0.44% 0.10% postgres 26936 pgsql 125 0 96048K 33600K RUN 1 0:00 0.44% 0.10% postgres 26947 pgsql -4 0 96048K 32544K semwai 1 0:00 0.44% 0.10% postgres 26964 pgsql 126 0 96048K 33720K RUN 2 0:00 0.54% 0.10% postgres 26956 pgsql 126 0 96048K 29644K RUN 0 0:00 0.54% 0.10% postgres 26960 pgsql 126 0 96048K 29000K RUN 1 0:00 0.54% 0.10% postgres 26977 pgsql 127 0 96048K 31988K RUN 3 0:00 0.70% 0.10% postgres 26969 pgsql 126 0 96048K 28896K RUN 1 0:00 0.54% 0.10% postgres 26978 pgsql 127 0 96240K 17868K RUN 0 0:00 0.70% 0.10% postgres 26973 pgsql 126 0 96048K 25872K RUN 0 0:00 0.54% 0.10% postgres 26989 pgsql 129 0 96048K 29680K RUN 2 0:00 1.03% 0.10% postgres 26993 pgsql 129 0 96048K 30276K *Giant 3 0:00 1.03% 0.10% postgres 26985 pgsql -4 0 96048K 20272K semwai 3 0:00 1.03% 0.10% postgres 27002 pgsql 131 0 96048K 22392K *Giant 3 0:00 2.00% 0.10% postgres 26997 pgsql 129 0 96240K 10128K RUN 0 0:00 1.03% 0.10% postgres 26998 pgsql 131 0 96008K 8560K *Giant 3 0:00 2.00% 0.10% postgres 27007 pgsql 131 0 96048K 15016K *Giant 3 0:00 2.00% 0.10% postgres 26937 pgsql 125 0 97028K 29152K RUN 3 0:00 0.22% 0.05% postgres 26959 pgsql 126 0 96048K 30932K RUN 1 0:00 0.27% 0.05% postgres 26981 pgsql -4 0 96048K 28652K semwai 0 0:00 0.35% 0.05% postgres 26955 pgsql 126 0 96048K 28892K RUN 2 0:00 0.27% 0.05% postgres 26972 pgsql 126 0 96272K 16792K RUN 3 0:00 0.27% 0.05% postgres 26976 pgsql 127 0 96048K 28860K RUN 0 0:00 0.35% 0.05% postgres 26994 pgsql 129 0 96048K 28648K *Giant 0 0:00 0.51% 0.05% postgres 26996 pgsql 129 0 96048K 29036K *Giant 0 0:00 0.51% 0.05% postgres 26995 pgsql 129 0 96048K 25360K *Giant 2 0:00 0.51% 0.05% postgres 26987 pgsql 129 0 96048K 21732K *Giant 2 0:00 0.51% 0.05% postgres 26991 pgsql 129 0 96048K 25324K *Giant 3 0:00 0.51% 0.05% postgres 26990 pgsql 129 0 96240K 10660K *Giant 0 0:00 0.51% 0.05% postgres 27003 pgsql 131 0 96048K 14644K *Giant 2 0:00 1.00% 0.05% postgres 50564 pgsql 76 0 5912K 3964K select 0 14:06 0.00% 0.00% postgres 1288 mysql 96 0 51092K 20280K select 1 5:21 0.00% 0.00% mysqld d01.int> vmstat 5 procs memory page disks faults cpu r b w avm fre flt re pi po fr sr da0 fd0 in sy cs us sy id 2 0 0 187748 268744 2332 0 0 0 1686 1 0 0 722 0 422 5 3 91 0 0 2 186664 269572 8795 0 0 0 1867 0 2 0 727 0 3190 5 4 91 0 0 0 183780 271296 8041 0 0 0 1633 0 3 0 665 0 1952 5 3 92 0 0 0 183780 271296 9555 0 0 0 1814 0 4 0 755 0 2850 5 4 90 [begin ab] 1 52 14 280896 213092 25974 0 0 0 2980 0 0 0 1202 0 26804 14 14 72 0 46 23 292164 205220 22854 0 0 0 3606 0 24 0 1082 0 40464 14 17 69 5 56 19 308216 194320 22839 0 0 0 4010 0 2 0 1102 0 41540 15 16 69 4 68 12 311540 194384 21314 0 0 0 3925 0 7 0 1038 0 49771 16 16 68 0 59 27 316904 187996 21678 0 0 0 3752 0 5 0 1057 0 43480 15 16 69 0 43 46 321064 186856 22168 0 0 0 4041 0 4 0 1047 0 43670 15 16 69 4 82 5 330776 180308 21773 0 0 0 3354 0 7 0 995 0 47354 13 18 68 [end ab] 0 29 5 252440 227260 19208 0 0 0 4966 0 34 0 1086 0 47183 16 19 66 0 0 0 183780 271280 10660 0 0 0 3944 0 3 0 760 0 10161 9 6 85 ^C