Adding servers to the China zone


Yea, I noticed that all of my servers were down a short while ago. One of them because I did not add enough sources and so I would lose connection and then report strat 10. One of them due to me forgetting to turn on the VM after I did some maintenance and the final one because I broke things. (It’s still at -100 because I have not fixed it yet). I would ask to add the IPv6 versions of those two servers (2a0d:1a40:fa2::1 and 2a0d:1a40:fa4::1). I know one of them is still at -100 but I plan to fix it today. I won’t add my original server right now because it can’t handle the load though I am upgrading the hardware soon.

I’m going to work on fixing the last server today and do a few other things to hopefully improve how many packets they can handle.

P.S. Could you move this server from CA to US as the IP has wrong GeoLocation.


I had a look at the repository to see if I could figure out how to implement something that requires 10 bad scores (or even two) before removing points. Unfortunately, I don’t know the language so I have no idea where to look to find a place to add the change.


Where is the source. I should be able to find it. I’d only agree to put in the time if it was going to actually be used.



Here is the git repository. I am sure that Ask would accept your pull request if you make one.


Good keep it there. It keeps dropping below 10 but I don’t know if that’s the monitor or it catching high load so I put a log on load averages and I’m inferring about bandwidth prices with the host.



As a side note. The one of my servers in the CN zone that is working, has kept a score of higher than 10 for a little while now at 100 speed setting. So I may increase that


[][/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