Adding servers to the China zone


[][/opt/src/ntppool/lib/NP/Model]# grep -nA 2 active_score
15:sub active_score {
16- return 10;

I know PERL quite well. I will keep you updated.

Next it is used in `./ntppool/lib/NP/Model/’ to get entries from an SQL server in :

my $entries = $dbh->selectall_arrayref(
    qq[SELECT s.ip, s.netspeed
     FROM servers s, server_zones l
     WHERE l.server_id = AND l.zone_id = ? AND s.in_pool = 1 AND s.ip_version=?
     AND s.score_raw > ?
     and (s.deletion_on IS NULL OR s.deletion_on > DATE_ADD(NOW(), interval ? day))
    ], undef,

[edit: this is inside of the active_servers method]

It is polling an SQL database for `score_raw’ larger than 10, so further is to look how this variable/information is used, but I’m almost positive this is it.

Further on, this does mean that `active_score’ is meaning the score to keep active in the DNS. That is, if this code is not simply for the web interface of ntppool, as it looks that way slightly. I would have to look further when I have time. [also further on, this is unable to be verified for the reason below]

Further on, that data is used by converting it into other object variable constructs in `’ in the same directory. That information is further used in `./ntppool/lib/NTPPool/Control/’ in an object called `render’ via object reference. Yet no further code calls the `render’ object from there, so this is indicative that there is more code missing, and that it is unable to be told if this is indeed code used to update the DNS entries with the IP addresses or used to render the website. Inside of `’ the `render’ object is the last reference where of which the value is converted to JSON for use in another location, yet the object/data is never called/used in this code in the git repository you mentioned, as these are libraries to be used somewhere else.

A lot of edits, but there is some information. I am looking at this now as this explanation may not be exactly accurate. I was up late last night and needed to get to bed. [edit: looks like what I said above about no further reference, could very well be untrue]

Yes, I found the object’s next reference: `return $self->SUPER::render(@_);’ in `./ntppool/lib/NTPPool/Control/’ moving on… At the moment I am doing so many things for my 83 year old grandmother I am visiting in NY, from NC, that I will have to piece this together in time.

Further on, taking another reference path (from before it is used in, `active_servers()’ is called from `populate_country_zones’ in `’ where I am leaving off, yet it is being used for pgeodns which is a PERL DNS server, I have found from googling. At this point it looks as if that either way active_score is going to be used for both updating the DNS and rendering the website.



1 Like

Okey, added. Thanks for helping :slight_smile:


Okey, I have added the IPv6 servers to CN but IPv6 servers has never been a problem for the CN pool. Its IPv4 that is a problem. From now lets focus on adding IPv4 servers.
Its getting better with 18 IPv4 servers in the pool for now.

I have also moved the CA server to US.


Thanks. It looks like the CN zone is doing better. I’m only getting about 15mbps of NTP which is about 25kpps.


@iocc Please also add this server to the CN zone, thanks again!



Please also add these two servers to CN pool:

1 Like


Please place in the cn and hk zones and remove from the asia zone

Another HK VPS up for the next year


Sure, its now added!

1 Like

They are added now. Thanks for helping.


I have added the IPv4 to cn and removed asia. IPv6 is not a problem for the CN pool.


hey iocc:
can you please remove these servers from all zones except cn? Thanks

And add this server to the cn zone:


Done, done and done. Thanks.


I put together one last unmetered kvm VPS to be dedicated to China. Does anyone know an appropriate speed setting for it? It is 2ghz 100MiBit. CPU will definitely be the limit. I think it should do 30kqps just fine. It’s a ways away but China needs it.

@iocc please add this last one to cn zone and take it out of everything else. It will score up in a bit.


Ok, fixed.

For the moment the CN pool seems stable with around 20 servers.
I have experimented with different bandwidth settings and right now
with 20 working servers I get approx this amount of traffic for each
setting below:

100 Mbit/s - 2000 KB/s
250 Mbit/s - 2800 KB/s
500 Mbit/s - 3500 KB/s

Around 4000 KB/s the VM starts to drop packets and cant keep up with
the packetrate so I will stay on 500 Mbit/s for now.
Its good to to have margins as spikes might come.

1 Like

On my main CN zone server, I am seeing around 10mbps at the 1000mbps setting. Before the 20th of March, I was seeing as much as 30mbps. Current packet numbers are about 20kpps down from around 40kpps before the 20th.

1 Like

For anyone who interested about this. This is some monitoring result from China yesterday. Thanks for your help, CN zone running well.

The problem now is delay: most server has delay more than 100ms. Still need server in China to solve it.


Theoretically we can have pool servers from other east Asian zones supporting China zone to achieve a lower latency for China users, however most Asian zones are in lack of pool servers, so it might not be a practical solution. I guess we still need to have a monitor inside China before we can really have pool servers inside China.


I guess I’m hard to please, but … This is about one of my servers,

As you can see the score is (as of this writing) a perfect 20 so it’s not dropping any packets.

That server is configured to serve the .cn zone only and the bandwidth setting was at 384kbit/s. Last week I noticed that at the current rate I would not reach my bandwidth cap so I thought I’d increase its bandwidth setting in the pool. Raised it to 512kbit/s, waited a day, nothing seemed to happen. Then I raised it to 1 Mbit/s, nothing. The speed setting has been at 1000 Mbit/s for a few days now and I’m still getting pretty much as much traffic as I had at 384 kbit/s. Stats: (see the Monthly graph from week 13 onwards).

While I think it’s generally good that I’m not hitting my bandwidth caps like I used to, I’m not sure if everything is working as it should if I can’t increase the amount of queries I get when I increase my bandwidth setting in the pool. I also have stats of when my server is included in the .cn zone and it’s showing expected results:

Has the situation in China improved this much recently? For the record, there are currently 20 servers in the .cn zone, which seems like a healthy amount.


I would think with 20 servers changing the BW setting should have some effect, but you have to realize that is still drastically underserved relative to the demand. So it could just be that no matter what the setting it is going to get utilized at a certain level to try and cope with all the queries.

Or Ask could have made some code changes specific to the CN zone… That is always a possibility.


Updated my `nf_conntrack’ to support a large amount of connections and
seems to be keeping in the pools thus far and responding to about 15kqps at an 11 score just fine. This is causing a load average of about `.20’