PDA

View Full Version : Postgresql server extreme cpu usage



daiquiri
08-29-2009, 12:13 PM
My PostgreSQL server (postgres.exe) shows 48-55% CPU usage when my system is idle.. It slows down my computer extremely.. This seems to be a problem that only started lately.. Any idea what I can do about it?

netsrak
08-29-2009, 03:32 PM
It could be the auto-vacuum process. Should be completed after some hours.

Popovitch
10-31-2009, 08:50 AM
Same problem, and when I open my Task windows manager, I got 10 processes used by postgres but only one is using 80-95% of my cpu.

fozzy71
10-31-2009, 01:40 PM
What version of postgre? What are your machine specs? Operating system, firewall/anti-virus?

You may want to try and reinstall sql using your same DB: http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177

Or perhaps, export all the data from your DB and reinstall the latest sql and import. If you want to try this, let me know and I can give you full step by step instructions.

Popovitch
11-01-2009, 04:42 PM
Hi

Hem version 1.09 beta 42, postgres v8.3.
My Pc is quiet an old one but it has been working for a year without any problem with Hem: Athlon 64 3000+ 1.81 Ghz 2,5Go DDr1
Os: Windows Xp sp2 version 2002

Now it was 3 of those processes which were freezing my pc and the only way to use my pc is to close manually those processes.
I can't see any of my previous played hands, It start freezing as soon as I go to the session part for cash game or report part or hand part and it won't show the hands I've played during a session, it takes 5 minutes to show a couple of hands but i can "read" them normally.

I want to do the best things to makes it work, what's to your point the best solution you mention.

Thx

fozzy71
11-01-2009, 07:43 PM
I would suggest you do the majority of the things in this thread: http://www.holdemmanager.net/forum/showthread.php?t=11194

Some of the most important things, imo:

- Remove the WinnerName, WinnerCards and WinnerWon from the Hands View Column Selector
- Turning off logging and deleting existing logs
- Vacuum/Full/Analyze, then Reindex - http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=163
- Defrag last and make sure you stop the postgresql service before you defrag. I personally use Smart Defrag.
- Do a Cold Boot (Shut Down > Start) before you use HM again


If that doesnt help, try reinstalling postgresql using the same DB.

Please update to the latest beta - http://www.holdemmanager.com/downloads/HmBetaUpdate.exe

For reinstalling SQL to the same DB, follow these steps:

1) Uninstall PostgreSQL from the Windows Control Panel.
2) If you are moving the DB to a different drive/partition, manually cut or copy the \Postgresql\8.x\data directory to it's new location.
3) run the command - start > programs > accessories > command prompt > right-click > run as administrator

net user postgres /delete
4) reboot.
5) Install the same version of PostgreSQL as your current DB using these instructions - http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177
6) If you have moved/installed your DB to a non-default location, please make sure to change the 'Data Directory' path during the installation.


If that doesnt help, I would suggest you export/backup everything and reinstall the latest version of postgresql and try rebuilding the DB. If you need instructions of what/how to backup, just ask.

For reinstalling SQL to a new/empty DB, please follow these steps:

1) Uninstall PostgreSQL from the Windows Control Panel.
2) manually delete or rename the Program Files\Postgresql folders
3) run the command - start > programs > accessories > command prompt > right-click > run as administrator

net user postgres /delete
4) reboot.
5) Install PostgreSQL 8.4, with your firewall uninstalled or turned off if windows firewall - http://www.enterprisedb.com/products/pgdownload.do#windows

Popovitch
11-02-2009, 05:06 PM
Yes please, I would like to know how to save my DB properly.

Thx

Popovitch
11-02-2009, 06:16 PM
I have reinstall postgresql to the same db, I still have 10 processes postgres with one or two which are freezing my cpu. I don't think it's a performance problem cause my pc is usually quiet stable.

And before that i couldn't vacum and analyse my db even manually, took some hour at the same line. (without writing any error).

fozzy71
11-02-2009, 08:21 PM
Yes please, I would like to know how to save my DB properly.

Thx

I want to re-install Holdem Manger without losing all of my settings and preferences. Can this be done? - http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=98

You want to make sure you backup your Processed/Archived hand histories, your entire \config folder, and your exportednotes file. http://www.holdemmanager.net/faq/?f=119. I usually just copy my entire \Holdem Manager directory.

Make sure you export your tournament summaries: Tourney > Results > Dataview > All Hands > Right-Click > Export Tourney Results and Summaries.

Export your bonuses and rakeback: Options > Bonuses and Rakeback > Export Bonuses; Export Rakeback

I would also make sure you manually export the database to hand history text files:

HM > Options > Database Management > Connect > Export Hands

How do I export or import hands into and from Holdem Manager? - http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=173

Make sure you copy that folder as well as the other stuff I mentioned.


Now that you have all that stuff backed up, you can try one of these methods for installing/restoring your currernt DB to the 2nd PC.

Instructions on how to backup and restore your database. - http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=12

How to re-install PostgreSQL and use a previous database. - http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177


I have reinstall postgresql to the same db, I still have 10 processes postgres with one or two which are freezing my cpu. I don't think it's a performance problem cause my pc is usually quiet stable.

And before that i couldn't vacum and analyse my db even manually, took some hour at the same line. (without writing any error).

Have you tried installing the latest version toa new DB yet? Follow my backup instructions above, and then:

Under Vista and Windows 7 make sure UAC is disabled http://www.holdemmanager.net/faq/afmmain.aspx?faqid=73 or else you must set \holdem manager\dbcontrolpanel.exe, holdemmanager.exe and hmhud.exe are started as administrator. Run the windows explorer and navigate to your Holdemmanager installation directory. Right click the executables and select "Run as admin" from the popup menu. Windows 7 you MUST set all the executables to always run as admin.

Turn off Windows Firewall for installing HM and PostgreSQL. You must also add exceptions to the Windows firewall, even if it is off. If you have a 3rd party firewall, uninstall it completely before installing HM/SQL - http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=171

* Install the complete setup of HM: http://www.holdemmanager.com/downloads/holdemmanager.zip
* Download the latest patch HM: http://www.holdemmanager.com/downloads/HmBetaUpdate.exe

* Install PostgreSQL 8.4, with your firewall uninstalled or turned off if windows firewall - http://www.enterprisedb.com/products/pgdownload.do#windows

Start Holdem Manager and connect/create a new UTF DB. Import the archived hands, exported hands, notes, rakeback and bonsues, huds, etc. If you did a backup/restore or reinstall of the old DB, you shouldnt need to do most of these steps.

Search the FAQ for the setup guide for your poker site:

http://www.holdemmanager.net/faq/afmmain.aspx