Open Side Menu Go to the Top

12-16-2008 , 04:29 AM
hi all,

I got tired of waiting for the Mac version, and started playing using Parallels on my MacBook. I bought PT3 a few months back, but I've noticed that things are starting to get chuggy now that my database has been filling up. I run maintenance/housekeeping, but the improvement is minimal.

I'm considering the following:
- right now PGSQL is running under parallels (which is fairly quick due to hypervisor), but likely not the same speed as native and worse on memory.
- I'm thinking of installing PGSQL on my OSX installation, and having PT3 connect from Parallels to the OSX installation.

Has anyone gone down this path? I'm sure I'll figure it out, but I'm curious about any performance gains / gotchas if someone else has done this.. I figure the biggest nuisance will be making sure the database server is reachable as localhost from the parallels 'shared' network connection.

thanks,
PT3 (PostgreSQL) & Virtualization Performance (on a mac)
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
PT3 (PostgreSQL) & Virtualization Performance (on a mac)
12-16-2008 , 02:07 PM
People have gone that route, and I believe it works fine. I don't know about performance gains, because nobody has posted a detailed trip report. You can follow this tutorial to see how to edit the postgres configuration files to get networking enabled (though obviously the windows directions won't work for you).

Good luck, if there's anything I can do to help just let me know (my G3 iBook isn't good enough to test much these days, though, or I'd have tried this myself .
12-16-2008 , 04:59 PM
Quote:
Originally Posted by Kraada
People have gone that route, and I believe it works fine. I don't know about performance gains, because nobody has posted a detailed trip report. You can follow this tutorial to see how to edit the postgres configuration files to get networking enabled (though obviously the windows directions won't work for you).

Good luck, if there's anything I can do to help just let me know (my G3 iBook isn't good enough to test much these days, though, or I'd have tried this myself .
thanks, I'll give it a shot over the holidays. Eventually I'll probably want to run PT3 off two machines, so it'll be a necessary evil at some point.

When I get around to doing it, I'll post detailed instructions. I should be able to manage -- I did my undergrad with some of the guys that PGSQL into the open source sphere, so I can always call in a favor.
12-16-2008 , 09:10 PM
I decided to procrastinate, and got the process started. It seems to be mostly successful, I'm just waiting for the PT3 based export/import to finish.

I had tried using pg_dump earlier, and it looked like I successfully imported into the Mac database, but when PT3 connected to it, it just said:

"loading player" and then "populating"

over and over again. I let it run for about 20 minutes before I gave up. Is there some sort of PT3 specific cache that needs to be rebuilt? The import directly from PT3 is slower, but at least it works
12-16-2008 , 10:32 PM
Yes, there is a PT3 cache, you can rebuild it via the Database --> Housekeeping menu (Update Cache).
12-16-2008 , 10:34 PM
I have about 23k tourney hands in PT3 on win2000 running on a parallels 2 instance on a macbook pro. Performance is fine, not great. Parallels 3 is supposed to be faster. I'm close to trying win2000 native using boot camp. That'll probably run much faster, but it's inconvenient.

I doubt you'll see better performance by using a remote db because you'll be losing local cache benefits, but I could be wrong. Please post your results, this is interesting.
12-16-2008 , 11:22 PM
There was a huge difference in performance from Parallels 2 -> 3, I recently upgraded to Parallels 4 and found another performance bump.

I don't know if the local cache hit would be so bad, since I'm not really going across the network, just from OSX to a virtual machine.

I've completed the process, and it hasn't gotten any slower. Database performance appears to be the same, perhaps slightly better, but my system is definitely more responsive.

Components:
- MacBook Core Duo (2.0 ghz), 2 GB RAM.
- Windows XP SP3

I've typed out my notes, but I need to edit a bit further. I'll do this and post tomorrow...
12-17-2008 , 10:47 AM
If you have a local network connection to the computer that the database is on, the network connection will be far faster than the seek time on the hard drive, so the network shouldn't cause any significant latency.

Also, I run PT3 in VMWare as Ubuntu is my primary operating system, and I run PostgreSQL in Ubuntu (I like to keep as little running in Windows as possible), and the performance has always been perfectly fine, even when I was running it on a ~5 year old machine.
12-17-2008 , 11:14 AM
My belief is:

PostgreSQL is far more mature on Unix, and to a lesser extent Linux, and has really only been available for a few years on Windows (without Cygwin).

Without any hard data (nothing on google), I (foolishly) assert that:

PostgreSQL on Unix is faster than PostgreSQL on Windows.

So any hiccup from network transport is likely offset by that.
12-17-2008 , 11:25 AM
Here's the instructions, as usual caveat emptor!

These aren't really 'hand holding' instructions, so I assume you know:
- a bit of database config
- a bit about (windows) networking
- a bit about command line / terminal usage

Before Getting Started:
In PT3 goto "Database->Database Management"
and Export your database. Put it somewhere safe.

Mac Side:
1. Download "Unified Installer Disk Image" from: http://www.postgresqlformac.com/
2. Inside the DMG file, you'll find a Server Directory -- run "PostgreSQL for Mac".
3. You should end up with a PostgreSQL folder in your apps directory. Go there.
4. That database should be started, you can verify this via the newly installed PostgreSQL pane in preferences.

In Parallels:
1. On the Devices Menu for Your Virtual Machine, Select Network Adaptor, and Choose 'Host Only' Network. -- Your virtual machine will no longer be connected to your network.
2. Goto 'Run', Type 'cmd'. A DOS box should pop up.
3. Type 'ipconfig' and press enter. You should see an IP address.

On your Mac:
1. Open terminal, type 'ifconfig', among the listed interface (possibly 5 or more), find the entry that matches the ip address you found in the previous step, it will have an entry that looks like: 'en5'. Remember this.
2. Goto apple->system preferences->sharing.
3. Turn on Internet Sharing for the interface you found in the previous step.

In Parallels:
1. Restart your virtual machine. Your internet connection should work again in Parallels.
2. You will now be able to connect to OSX (the host) as 192.168.2.1 -- this could vary. In Parallels, open a dos box and type 'ipconfig'. The ip of your host will be the last line, "default gateway".

In Mac
1. Open Finder, Navigate to /Library/PostgreSQL8/
2. Follow these instructions on making your config files visible:
http://www.postgresqlformac.com/serv...sql_confi.html
3. Next we need to allow connections from our virtual machine to our database, there's a few ways to do this, the easiest way is:
3a. Open a terminal.
3b. cd to /Library/PostgreSQL8/data
3c. open pg_hba.conf and add the line:
host all all 192.168.2.0/24 trust
(you may need to modify the IP address according to previous steps, and you may want to make your database access more restrictive).
4. Restart PostgreSQL on your Mac (via Preference Pane)

In Parallels
1. Open PokerTracker3
2. Goto "Database->Database Management".
3. Create a New Database. Give it an obvious description "DB@Mac" or something, and specify the hostname to be 192.168.2.1.
4. PT3 will suggest a name, that's fine. Make sure 'database exists' is unchecked.
5. Hit apply, it should say database was saved if everything is OK.

Make sure you set your active database to be the newly created, you'll know you have it right, because it's empty.

Final Step: Import all the exported hands into the new database. Do this from Import -> Manual Import.

Note: You may have to press the refresh button after your import if it still appears empty.
12-17-2008 , 11:37 AM
Benefits:

- Database will get backed up by time machine now.
- Unix command line tools superior to Windows Command Line Tools (imo)
- Faster PT3 startup (since it's not launching PG)
- Less Memory Used by Virtual Machine (especially for large databases)
- Easier to Serve the DB to other machines on network.
- +1 to nerd score.
12-17-2008 , 04:51 PM
Johnny,

Thanks for the detailed walkthrough; I'll keep a link around in case anybody else asks about it.
12-17-2008 , 06:19 PM
Quote:
Originally Posted by Kraada
Johnny,

Thanks for the detailed walkthrough; I'll keep a link around in case anybody else asks about it.
No worries. Feel free to add/enhance anything you see fit. I lost my patience for excruciating detail.
12-17-2008 , 06:32 PM
I know how that can be

But it really does look very good to me, so thanks again.
12-29-2008 , 11:06 PM
It's been a week or two, and I would say it's a definite improvement. I'd be willing to do some benchmarking if anyone has a set of queries (or PT3 reports) to try.
12-30-2008 , 11:34 AM
I think the summary tab is the most resource intensive built-in report in PT3. I haven't done a whole lot with custom reports, though, so there may well be a few of those that are pretty heavy on resource usage also.
08-25-2009 , 09:24 AM
Hey guys. Really appreciate the technical runthrough, is there any chance you could do a *slightly* more hand-holidng approach as I literally have no experience with Macs or parallels.

Thanks in advance!
PT3 (PostgreSQL) & Virtualization Performance (on a mac)
150% up to $2,000 Welcome Bonus on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
PT3 (PostgreSQL) & Virtualization Performance (on a mac)

      
m