0

I hired a VPS in DigitalOcean, it's hosted in Amsterdam, I'm in Turkey. But server is responding slowly and page is freezing/lagging even at ajax POST-GET request.(there is a basic browser game in server that coded with node.js.)

VPS : 4GB Memory, GB SSD, Ubuntu 14.04

This is a MTR report from my vps to my IP

HOST: GameServer                   Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 178.62.191.253             0.0%    10    0.4   0.4   0.3   0.6   0.0
  2.|-- 95.85.0.241                0.0%    10   14.0   2.1   0.3  14.0   4.2
  3.|-- adm-b7-link.telia.net      0.0%    10    6.3   2.4   0.4   8.6   2.7
  4.|-- adm-bb3-link.telia.net     0.0%    10    0.8   0.7   0.7   0.8   0.0
  5.|-- prs-bb1-link.telia.net     0.0%    10   10.1  27.6  10.1 153.1  45.0
  6.|-- mno-b2-link.telia.net      0.0%    10   29.6  29.6  29.4  29.7   0.0
  7.|-- pantel-ic-300221-mno-b2.c  0.0%    10   32.7  30.4  29.0  34.0   1.5
  8.|-- mil-col-1-mil-col-2.turkt  0.0%    10   29.0  29.9  28.9  33.7   1.3
  9.|-- 212.156.141.61.static.tur  0.0%    10   63.6  65.0  63.5  69.8   2.4
 10.|-- izmir-t2-2-izmir-t2-3.tur  0.0%    10   62.0  61.9  61.7  62.1   0.0
 11.|-- izmir-t3-1-izmir-t2-2.tur  0.0%    10   63.2  62.9  61.5  70.0   2.4
 12.|-- 81.212.78.42.static.turkt  0.0%    10   61.6  61.5  61.3  61.6   0.0
 13.|-- ???                       100.0    10    0.0   0.0   0.0   0.0   0.0

This is from my vps to google.com

HOST: GameServer                   Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- 178.62.191.254             0.0%    10    1.4   9.7   0.4  47.6  18.3
  2.|-- 95.85.0.233                0.0%    10    0.3   4.0   0.3  35.2  11.0
  3.|-- core1.ams.net.google.com   0.0%    10    1.2   1.3   1.2   1.5   0.0
  4.|-- 209.85.248.92              0.0%    10    1.1   2.3   1.0   9.7   2.6
  5.|-- 72.14.238.69               0.0%    10    1.0   1.2   1.0   1.5   0.0
  6.|-- 209.85.254.233             0.0%    10    4.6   8.2   4.4  28.6   8.1
  7.|-- 209.85.255.49              0.0%    10    5.0   4.8   4.0   6.2   0.5
  8.|-- ???                       100.0    10    0.0   0.0   0.0   0.0   0.0
  9.|-- ee-in-f102.1e100.net       0.0%    10    4.3   4.4   4.1   4.6   0.0

Should I contact to DigitalOcean or this is normal? Clearly there is a problem but I don't know.

Lazy
  • 101
  • 4
  • slow repsonce could be also due to CPU usage, disk usage or RAM usage. You should check everything to define bottleneck. Start with "top" command. – Navern Sep 01 '14 at 20:15
  • But there is nothing on server? Just 10MB scripts and a few library. Thank you I'll look. – Lazy Sep 01 '14 at 20:55
  • Imagine script which opens a very big file or parse some 10 gigabyte log, sure it will be only one script. But it's response time will be pretty great because of disk usage(iowait). First you have to find out where is bottleneck. I don't think it's network, rtt isn't great but decent enough. – Navern Sep 01 '14 at 21:19
  • I understood. This is a simple browser game with a few post/get requests and socket.io. I asked to DigitalOcean and they said it's because of other droplets in same hypervysor. – Lazy Sep 01 '14 at 21:46

1 Answers1

0

The "???" hop is unimportant in this case because the next hop is responding in a timely fashion. It's likely just some router blocking traceroute.

Is SSH also lagging while the problem happens? If not, you should look at what might be wrong with your node.js server.

Start by attempting the same POST/GET request locally using curl/wget and see if the slowness persists. It's very likely it will.

You then have to debug where this process is spending most of its time. node.js will stall if it has to wait. You can try to attach strace to it (strace -T -pPID -o nodejs.log) and see where it stops.

gtirloni
  • 5,746
  • 3
  • 25
  • 52
  • In ssh everything smooth. Also I'm not getting performance problems like this in localhost. I'll try to debug, thanks. – Lazy Sep 01 '14 at 19:11