regarding to your sentese here's my questions from 2+2. The main reason why I ask is that I have big issue with slowing down my PC (freezing). It turns out almost everyone who I know have the issue.
Software: Windows 7 Home Premium 64bit, PostgreSQL 9.2 64 bits (I was using also 9.0 and 8.4 but with this same result).
Hardware: SSD drive, 8GB DDR3, Intel Core i7 860 2.8GHz, ATI Radeon HD 4550, Gigabyte H55-UD3H.
Edit: My actuall PG configuration:
effective_cache_size - 2048MB
shared_buffers - 512MB
wal_buffers = 8MB
temp_buffers = 24MB
work_mem = 64MB
maintenance_work_mem = 256MB
commit_delay = 10000
checkpoint_segments = 128
checkpoint_completion_target = 0.9
To be clear I did everything what you advice:
-installed PG and HM2 as administrator with Windows Firewall turned off,
-don't use any antyvirus soft,
-Windows Defender is turned off,
-Added all exceptions to Windows Firewall (HudFuncsApp.exe, HoldemManager.exe , Easyhook files (exe and dll), blitz.dll, all ftp .dll, partyinject.dll, ip.dll, tablescannerdllloader, thirtytwobitipc,888.dll, speed.dll, all stars dll files, textboxhook.dll, all .exe files from TN2 folders, all .exe files from poker client folder, - Pg_ctl.exe, postgres.exe, stackbuilder.exe, pgAdminIII, input and output ports for PG) after what I turned it off anyway,
-turned off UAC,
-reinstalled .NET Framework,
-OS is fully update,
-Secondary Logon is set to automatic,
-now I have ENG OS so I did installed PG it in default localizatrion,
- for hudfuncapps.exe, HoldemManager.exe, tablescannerdllloader.exe, exe files from pokerclients folders, Postgres.exe, pg_ctl.exe, tableninja.exe I make them to run as admin for all users;
- HoldemMenager2, HoldemManager in Roaming folder, HM2Archiwe in C:/ and other folders like hand histories etc. make them not to read only, added users everyone and Network (PG user in 9.2) and gave them full control,
- Installed the newest drivers for graphic card from producent website,
- I have decktop compositions turned on,
- no opacity in HUD,
- use Auto-Z order,
- added <Key Name="ProcessWorkingSetBase" Value="500000000" /> <Key Name="ProcessWorkingSetHandAmount" Value="000" /> to Generals in HoldemManager.conf,
- I have disabled Note Caddy Pro or set to using 2 threats with Turbo Grabber off (depends what I need)
- disabled some off the aero theme components.
So now I'm back with my questions :
-May it be HM/PG is leaking connections? Failing to close connections after use, instead opening a new connection.
When I asked somebody about PG performace I receive this question:
Could it be the main reason why a lot of grinders throw away their monitors via windows? I found also this:Do you close the connections on your app? Or the DB crashes because of too many open connections?
When running as a service, you may experience failures with more than approximately 125 simultaneous connections. This can happen because some of the libraries that PostgreSQL is dependent on are dependent on user32.dll which allocates memory from an area known as the Desktop Heap. The desktop heap is assigned to each logon session, with non-interactive sessions typically being assigned 512KB. Each postgres process that runs typically consumes approximately 3.2KB of desktop heap, which coupled with other overhead can exhaust the allocated heap at somewhere around 125 connections. This doesn't happen when running from the command line (or more precisely, happens with much higher numbers of connections) because the interactive logon session is typically allocated 3MB of Desktop Heap.
- after I will install 32-bit postgres do I have also instal PostgreSQL ODBC driver?
Because 32-bit versions of the PostgreSQL server only install a 32-bit libpq and pgsqlODBC, only 32-bit programs on the computer the server was installed on can use the database unless a 64-bit ODBC driver or libpq is installed as an add-on.Unless you've also installed a 64-bit version of psqlODBC, a 32-bit install of PostgreSQL will only have a 32-bit ODBC driver. The 32-bit ODBC driver may only be used by 32-bit programs, and will not show up in the 64-bit ODBC administrator.
This gets confusing because on 64-bit windows c:\windows\system32\odbcad32 is the 64-bit ODBC driver administrator, despite the name. This is a historical artifact of Windows development. Apparently many apps and installers depend on odbcad32.exe having that name and path, so Microsoft landed up being stuck with it despite the now-stupid name, which made sense back in the 16- to 32-bit transition but makes none now
- how big should be work_mem if queries using by HM2 are very simple?
You advice to set it to 128MB but if the queries are so simple isn't it better to set it to let's say 16MB?
-effective_cache_size - is it reasonable to set it to 2/3 of available RAM? and what should I thnik when thinkin about available RAM, whole RAM, available RAM when I'm running my PC in normal way (turing the sessions with HM2 turned of)? Or available RAM is ram left after dedicating some values to other processes?
- autovacuum - should I have turned it on or off? Other way, is writes constant or batch? If I have to turn this on, how should I do that - I mean parameters for auto_vacuum like how often etc.
- multiple_autovacuum_workers - what should I understand by advice to set it to no more than 1/2 cores?
I understand when HM2 is using PG as DB server it's not your fault PG is configured for low performace but could you make some guide like a PG performance for fishes. I don't mean giving people clues in way set it to, set it as and should be ok. I mean it would be nice to explain what is some parameter mean, how depended from each other are for example sharing_buffers and effective_cache_size. I want to eat PG but all the time I ready one sentence about PG I have to open dozens new tabs in my web browser and search for informations to understand that sentence. It would be helpful specially a lot of grinders would set PG to best performance and not everyone have a knowledge about DBs or atleat postgre. I may be wrong but what actually u do is:Don't take it wrong because I understand it's not so easy but 95% users don't. When you can read at some poker social network one of the network owners had wrote " HM2 (and TN2) is a scam " and when you hear complainments again, again and again that's not a very good image for your company. I know dozens of grinders and nobody every said: buy HM2, that's great soft! Instead I hear all the time thinks like this: "LOL, u use HM2?! buy PT4 and make your life easier".yes, we made commercial soft which is using open-source technology but it's not our fault the free soft needs to be professionally configured. U have to configure it and that's your problem, there's everything good from our side. GL!
I wrote this because I dream about the day when I will say: "LOL, throw away PT4 and buy HM2 you donkey".