Poker databases defrag (Mansion)

    • Werkon
      Werkon
      Bronze
      Joined: 29.06.2008 Posts: 78
      Hi guys, I'm playing at Mansion poker, but the tip I'm going to present is usable on every poker platform. The problem with Mansion is that it is very inefficient when creating its database of played hands. I'm playing about 5 tables at a time and I often feel notable lag when hand finishes and another one is about to start. My hdd starts rattling like crazy for few seconds and new hand starts only after the rattling stops. Another problem is that when you are picking another table and hit that rattling period, Mansion won't join it and often somebody else takes that last seat, which tilts :) The reason for that is simple - database file gets fragmented into a LOTS of small chunks (about 4000 fragments after a week for me) and when something has to be written to it, it takes a long time because drive needs to seek many times.

      Looks like a lot of people have this problem (Mansion & many tables) and HDD is obviously the bottleneck. One solution is to run pokersoftware from RAM-disk, which is nice, but complex to maintain and handle. Regularly defragging your drive will help, but it takes a long time.

      Instead, I found a solution that is both fast and easy to achieve. By using excellent freeware defragmenter called JkDefrag, it is possible to defrag only given files/directories and never touch the rest. So, if you want to give it a try, follow these steps :
        Download JkDefrag from http://www.kessels.com/Jkdefrag/
        Extract it somewhere (it has no installer)
        Create a new text file in the same folder as you extracted JkDefrag, name it for example "pokerdefrag.bat" (it is important to change extension from .txt to .bat !!!)
        Right-click on the file and click "Edit"
        Now, you want to choose, what you want to defrag. If you use some tracking soft like Elephant or PokerTracker, you can defrag those also, just note the directory where every poker-software is installed
        Write everything in the .bat file with following syntax :
        code:
        JkDefrag.exe -a 2 -q "first_directory" "second_directory" "..."

        For example, my .bat file looks like this :
        code:
        JkDefrag64.exe -a 2 -q "C:\Program Files (x86)\MansionPoker\*" "C:\Program Files (x86)\PostgreSQL\*"

        As you can see, I'm defraging my Mansion software and in addition to it, the PostgreSQL directory where all poker-software databases are usually stored. Basically, you put every poker-software diretory in "" apostrophes and suffix it with * to defrag everything inside. I'm using 64-bit windows so I have JkDefrag64.exe and Program Files(x86), just replace those with your filenames.

      Well, after that you just run that .bat file and JkDefrag should do the work in short time (few minutes max, if you dont have some sick databases with millions of hands :) ). Well, results may vary but I hope that this will help someone out when your poker-software tilts you :)
  • 6 replies
    • Werkon
      Werkon
      Bronze
      Joined: 29.06.2008 Posts: 78
      I tried another session today with defragged DB's and it is definitely a difference. Tables open much faster.
    • redskwerl
      redskwerl
      Black
      Joined: 03.03.2008 Posts: 3,802
      This helped to speed up the mansion software a bit, thank you!
      Unfortunately the effect doesn't last long, it started to get laggy towards the end of the session.. but its an improvement nevertheless:)
    • Werkon
      Werkon
      Bronze
      Joined: 29.06.2008 Posts: 78
      Yeah, Mansion quite sucks in managing its DB file :( I do defrag after each session.
    • justkyle88
      justkyle88
      Bronze
      Joined: 07.05.2008 Posts: 7,596
      when I extract it (I use winRAR) it just starts defraging my whole computer.
      Any tips?
    • Werkon
      Werkon
      Bronze
      Joined: 29.06.2008 Posts: 78
      Originally posted by justkyle88
      when I extract it (I use winRAR) it just starts defraging my whole computer.
      Any tips?
      You have to pass the correct parameters using a .bat file. When you run only JkDefrag.exe it automatically defrags all hard drives. If you are using 32-bit windows and Mansion Poker in standard location, then you can use this :
      code:
      JkDefrag.exe -a 2 -q "C:\Program Files\MansionPoker\*"
      Just create a new text file in the same directory as you unpacked JkDefrag, paste it inside, save and change extension to .bat .Then just double-click the .bat file (NOT JkDefrag.exe) when you want to do the defrag and you should be OK :)
    • justkyle88
      justkyle88
      Bronze
      Joined: 07.05.2008 Posts: 7,596
      Originally posted by Werkon
      Originally posted by justkyle88
      when I extract it (I use winRAR) it just starts defraging my whole computer.
      Any tips?
      You have to pass the correct parameters using a .bat file. When you run only JkDefrag.exe it automatically defrags all hard drives. If you are using 32-bit windows and Mansion Poker in standard location, then you can use this :
      code:
      JkDefrag.exe -a 2 -q "C:\Program Files\MansionPoker\*"
      Just create a new text file in the same directory as you unpacked JkDefrag, paste it inside, save and change extension to .bat .Then just double-click the .bat file (NOT JkDefrag.exe) when you want to do the defrag and you should be OK :)
      wow I really do suck with computers.
      I find this very hard to understand, haha. sorry for the dumbness of this.
      It's fine, ill just use this program to defrag my whole computer, it done a great job, computer is running a lot smoother.