Poker-AI.org

Poker AI and Botting Discussion Forum
It is currently Mon Nov 13, 2023 2:50 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Thu Dec 12, 2013 9:32 am 
Offline
Veteran Member

Joined: Wed Mar 20, 2013 1:43 am
Posts: 267
Will it still be impossible to scan my processes etc. on the host from the VM?


Top
 Profile  
 
PostPosted: Sat Dec 14, 2013 2:05 am 
Offline
Regular Member
User avatar

Joined: Wed Oct 02, 2013 5:00 pm
Posts: 64
It's possible to know the TCP/IP connections opened from the VM, which would raise a flag. A better solution would be to have postgres running in the host and configuring PT (or whatever you're using) to connect to it using the host's IP


Top
 Profile  
 
PostPosted: Sat Dec 14, 2013 1:22 pm 
Offline
Veteran Member

Joined: Wed Mar 20, 2013 1:43 am
Posts: 267
Why is that safer? I don't know a lot about security, what is the difference between both methods?


Top
 Profile  
 
PostPosted: Sun Dec 15, 2013 12:06 am 
Offline
Junior Member

Joined: Sat Jun 29, 2013 7:52 am
Posts: 11
It is perfectly ok to have your database across the network and connect to it(so DB on host, PT4 or HEM1 on VM). This works for PT and HEM1(not HM2) and is a used function by normal users. On the other hand, an external process connecting to the VM DB might raise some flags. Alternatively, you can probably use several cloud tracker DBs on the market.


Top
 Profile  
 
PostPosted: Sun Dec 15, 2013 7:54 pm 
Offline
Veteran Member

Joined: Wed Mar 20, 2013 1:43 am
Posts: 267
Ok, I guess it's really less suspicious. thx


Top
 Profile  
 
PostPosted: Mon Dec 16, 2013 4:04 pm 
Offline
Veteran Member

Joined: Wed Mar 20, 2013 1:43 am
Posts: 267
I started working on my SQL queries, but its extremelly slow, one query takes 0.12 seconds and my DB isn't even big yet. Is that normal? Is there anything I can do, besides caching? Would it make sense to just load the whole Db into RAM?


Top
 Profile  
 
PostPosted: Tue Dec 17, 2013 9:36 am 
Offline
Veteran Member

Joined: Wed Mar 20, 2013 1:43 am
Posts: 267
Well, I implemented simple caching and simple garbage collection now, it seems to work fine now, but I need to test it in real play. Let me know if anyone is interrested in a small pt4 java tutorial.


Top
 Profile  
 
PostPosted: Tue Dec 17, 2013 5:47 pm 
Offline
Regular Member
User avatar

Joined: Tue Mar 05, 2013 9:19 pm
Posts: 50
PT4 already has a cache that they use for fast stat retrieval, are you using that? How big is your db?


Top
 Profile  
 
PostPosted: Fri Dec 20, 2013 11:45 am 
Offline
Veteran Member

Joined: Wed Mar 20, 2013 1:43 am
Posts: 267
No, I am using my own cache, where I save the ResultSets. I looked into the PT4 cache, but it doesn't have the elementary stats, this would mean, that I can not create custom columns, or will the appear in the cache, if I define them in PT4?


Top
 Profile  
 
PostPosted: Tue May 27, 2014 7:46 am 
Offline
Veteran Member

Joined: Wed Mar 20, 2013 1:43 am
Posts: 267
I have not been very active in the past weeks, but I started my bot project again and I recognized my mistake.

I was pretty much a complete noob, when it came to SQL. The bottleneck was (like it is often) the data transfer. Most stats are just a ratio of sums of things, like SUM(VPIP Flag) / SUM(Hands) but I have been transferig lanrge data sets into my ResultSet object and I was later looping through it in Java.

Now I use SUM() in my SQL statements and only transfer a single integer to Java. It brough the computation of some stats from 340ms down to 1ms, should be fast enough now.
You should do most of your computation in SQL if you have similar problems and filter the data as much as possible with WHERE statemets.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group