Overview:
The following are tips and solutions to performance and speed related issues. Even if you don't have these issue's many of the these suggestions can keep your database running efficiently.
NB: Some of these procedures are for advanced users only, don't try any procedures that you’re not completely comfortable with.
Hardware
PostgreSQL
Holdem Manager
Operating System
3rd Party Software
Hardware
Hard Drive:
Get a fast hard disk, it’s more important to have a fast hard drive than having a quad-core processor over a dual-core processor.
- Preferably two+ SSD harddisks in a RAID-0 array. (fastest)
- Get one SSD just for your database and Windows (Intel X25-M G2 Postville)
- Or two new 7200 RPM harddisks in RAID-0
- Or just a really fast SCSI/SAS 10k RPM / 15k RPM hard disk (requires an expensive SAS/SCSI controller) or a VelociRaptor
- A new 7200 RPM IDE/SATA harddisk (slowest)
The SSD not only wins on Sequential Read/Write speeds (of big files), they win the most with access time, 4K Read/Write speeds (small files) and just "overall" I/O operations per second.
A Western Digital VelociRaptor used to be easily twice as fast as the best 7200 RPM harddisk. However it currently only is about 10% faster than the latest Seagate Barracudas, Hitachi Deskstars, Western Digital Caviar Blacks and Samsung Spinpoints F1/F3. And the VelociRaptor does not justify its price difference anymore. So for the best price/performance, a new high-end 7200 RPM harddisk is your best choice).... Note: a brand new $60 high-end 2009 model 7200 RPM hard disk will be twice as fast as your 3-4+ yrs old 7200 RPM hard disk!... get a SSD if you can afford it. LAPTOP: get one with a SSD. ALL 7200 RPM laptop harddisks are slow (favouring being energy efficient over performance, make sure the Power Options are set to HIGH PERFORMANCE).
RAM:
Get lots of RAM (at least 2+ GB RAM recommended if you have a 10+ GB database) (note: when using more than 3 GB RAM, use a 64-bit version of Windows)
CPU's:
-3 PostgreSQL love multiple CPUs, so the more CPUs the better. (Intel i5 / i7 or AMD Phenom) Also "Holdem Manager will be adding improvements in 1.10 that will take advantage of quad core/64 bit versions."
PostgreSQL
Edit your PosgreSQL.conf file in the SQL C:/Program Files/8.x/data folder.
Do not use the Tuning Wizard. On some systems it will make changes to the postgresql.conf it shouldn't, resulting in being unable to connect to the database!
If you experience this problem simply go to the 8.4/data folder, and delete postgresql.conf, and rename the backup postgresql.conf.2009(data xxxxxxxx) back to "postgresql.conf" and reboot.
Recommended changes:
shared_buffers = MB (set this to 20% of your system memory, but not more than 1000 MB.... round it off to 128 MB, 256 MB, 512 MB or 768 MB)
effective_cache_size = MB (set this to 2x the size of the shared_buffers)
Decrease the SIZE of your database:
- How to optimize the database size in 3 steps: -1 Vacuum, -2 Reindex, -3 dump/restore
- VACUUM: Analyse your database regularly(How to do a manual VACUUM)
- REINDEX (see Vacuum, but choose Reindex instead of Vacuum in pgAdmin)
- Dump/restore (for advanced users) Step by step how to dump/restore the database
How to make PostgreSQL stop making those big log files (I had 8 GB of logfiles before I realized you're allowed to delete the content of the data/pg_log directory):
http://www.holdemmanager.net/forum/showthread.php?t=8423
Holdem Manager:
The following are tweaks you can make to Holdem Manager to improve performance
- Please install the latest version: http://www.holdemmanager.com/downloads/HmBetaUpdate.exe
- Remove the WinnerName, WinnerCards and WinnerWon from the Hands View Column Selector
- Purge hand histories (It will free up disk space without losing stats, but you lose the option to see the HH or view the hand in the replayer)
- Disable Multiple Panels if it's unnecessary.
- In HUD Options > Table Preferences, select Force on Top. (If this doesn't help, turn it off afterwards; you'll need to restart Holdem Manager for it to take effect).
- Make sure you are displaying only the "last 100" hands in the Hand View
- In Holdem Manager, move your opacity slider in HUD Options > Player Preferences and HUD Options> Table Preferences completely to the right.
- Update your Windows (use Microsoft Update, and make sure you have the latest Service Pack (SP2 for Vista, SP3 for XP) and update all system drivers (including your mainboard and videocard driver).
- Turn off indexing and turn off "compress this drive to save disk space" in your harddisk properties.
- Optimize Windows for "best performance" (in Control Panel/System/Advanced/Performance/Setting/Visual Effects).
- Advanced users only: save space by turning off System Restore (System/System Protection) and moving (or make it smaller if you have enough RAM) your Virtual Memory system page file (System/Advanced/Performance/Setting/Advanced).
- Windows 7 users, General Windows 7 Performance Tweaks guide (If you already have a SSD harddisk also do all the SSD Tweaks in that guide)
- In your PC, go to Control Panel > Power Settings and make sure it's running on high performance. Power Save mode can sometimes affect the performance of your machine.
Sometimes Anti-virus programs scan all the folders in a file, so it's advisable to set exceptions for all the auto import folders, Holdem Manager and PostgreSQL folders.
The instructions below include details for setting exceptions for the firewall.
If you have an anti-virus software running, add all the files mentioned below in Windows Defender. If it's not possible to add these files, uninstall the anti-virus completely and restart.
Exceptions can be added by following these instructions. See your anti-virus manual for instructions on adding exceptions to your anti-virus although it should be very similar.
- Defrag your non-SSD harddisk, using Defraggler by Piriform. Or you can use Disk Defrag by Auslogics or htmlPower Defragmenter (all FREE software and better than the Windows Defrag feature). It is recommended to stop postgreSQL from running before you use defrag! (To stop and start the service: Start > All Programs > PostgreSQL > Stop Service / Start Service)
- A near-empty harddisk is faster than a near-full harddisk, so delete unwanted programs CrapCleaner by Piriform and Windows Disk Cleanup can help.
- For a Poker Stars specific fix: In the lobby, go to Options > Advanced Multi-table Options. Unselect popup table whenever user action is required, click OK and restart Poker Stars.