Bandwidth

Discussion in 'Co-op Advertising Network' started by alephito, Sep 9, 2005.

  1. #1
    We are using ad_network_370.php in a PHPBB forum running in IIS with FastCGI, usually with 50 or 60 concurrent users.

    Our server administrator complained about the forum recently using a lot of bandwidth. Trying to determine what recent changes we made to the site, we realized that the major one was starting to use the Co-op Ad Network. So we removed the call to ad_network_370.php and we were surprised to find that we reduced instantly the traffic in about 1.5 Mbps.

    Could it be possible that the Coop uses such amount of bandwith?

    I do not know if it is relevant to this issue (I am not a tech guy) but the <img src= part of the code does not appear in our pages at the end of the inserted links as expected (maybe because we are in IIS?).

    By the way: from time to time, the txt file empties itself and starts filling again.

    Thanks in advance for any comment. Honestly, we found very valuable the Coop so we would love to find a solution. And forgive my english.
     
    alephito, Sep 9, 2005 IP
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    Something isn't right... the .txt should not clear itself for one and that could cause minor bandwidth increase as it would need to get 1,000 ads to fill it again, but most DEFINITELY not anywhere remotely close to 1.5Mbit/sec... if anything MAYBE like 0.5k/sec while it was getting new ads.
     
    digitalpoint, Sep 9, 2005 IP
  3. alephito

    alephito Peon

    Messages:
    197
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, I know something isn't right. But we connected/disconnected several times the call to the script and the variation in traffic was real.

    Any idea why the GIF does not appear in the source code of the generated pages?

    Shawn, if you would like to check our site, we can connect the Co-op again. Please, let me know.

    Thanks.
     
    alephito, Sep 9, 2005 IP
  4. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #4
    To be honest, I'm not an expert with IIS or FastCGI, so I wouldn't be able to tell much. When was the last time the ad network PHP file was enabled? If it was recently, gimme your domain name, and I'll check the web logs on this end to see how much bandwidth was being used.
     
    digitalpoint, Sep 9, 2005 IP
  5. alephito

    alephito Peon

    Messages:
    197
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yesterday around 2:00PM ET was our peak and we disable the code. elaleph.com/foros

    Thanks.
     
    alephito, Sep 9, 2005 IP
  6. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #6
    I took a sampling from the logs, and it looked like everything was running normally on your end until 2:38 am (on Sept 8). Was requesting one new ad every 30 minutes, then a ton after that (cleared .txt file maybe?) Do you use disk quotas on your server? Maybe the user who owns the .txt file ran out of disk space or something and the server wouldn't like the .txt be written to the volume. But even then each request for a new ad only takes about 150 bytes of bandwidth, so you would need to be making ~1,200 requests for a new ad per second to come out to 1.5Mbit (which clearly isn't happening).

    200.73.189.157 - - [07/Sep/2005:17:03:19 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 155 "-" "-"
    200.73.189.157 - - [07/Sep/2005:17:33:22 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 138 "-" "-"
    200.73.189.157 - - [07/Sep/2005:18:03:26 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 152 "-" "-"
    200.73.189.157 - - [07/Sep/2005:18:33:29 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 143 "-" "-"
    200.73.189.157 - - [07/Sep/2005:19:03:33 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 154 "-" "-"
    200.73.189.157 - - [07/Sep/2005:19:33:35 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 138 "-" "-"
    200.73.189.157 - - [07/Sep/2005:20:03:48 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 134 "-" "-"
    200.73.189.157 - - [07/Sep/2005:20:34:04 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 142 "-" "-"
    200.73.189.157 - - [07/Sep/2005:21:04:25 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 147 "-" "-"
    200.73.189.157 - - [07/Sep/2005:21:34:39 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 138 "-" "-"
    200.73.189.157 - - [07/Sep/2005:22:04:46 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 138 "-" "-"
    200.73.189.157 - - [07/Sep/2005:22:34:51 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 134 "-" "-"
    200.73.189.157 - - [07/Sep/2005:23:05:13 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 155 "-" "-"
    200.73.189.157 - - [07/Sep/2005:23:35:15 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 135 "-" "-"
    200.73.189.157 - - [08/Sep/2005:00:05:27 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 126 "-" "-"
    200.73.189.157 - - [08/Sep/2005:00:35:33 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 131 "-" "-"
    200.73.189.157 - - [08/Sep/2005:01:05:35 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 148 "-" "-"
    200.73.189.157 - - [08/Sep/2005:01:38:02 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 132 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:08:12 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 139 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:38:13 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 151 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:40:50 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 145 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:41:00 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 165 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:41:08 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 159 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:41:13 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 128 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:41:19 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 150 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:41:26 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 131 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:41:32 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 178 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:41:42 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 142 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:41:55 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 163 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:42:15 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 141 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:42:22 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 165 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:42:37 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 141 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:42:45 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 149 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:42:56 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 174 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:43:04 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 163 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:43:11 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 136 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:43:16 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 145 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:43:22 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 138 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:43:30 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 133 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:43:35 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 154 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:43:42 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 129 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:43:48 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 141 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:43:54 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 137 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:44:04 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 127 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:44:09 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 148 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:44:14 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 137 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:44:21 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 174 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:44:33 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 163 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:44:39 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 135 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:44:45 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 148 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:44:50 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 142 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:44:58 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 154 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:45:03 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 166 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:45:12 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 127 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:45:21 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 135 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:45:26 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 140 "-" "-"
    200.73.189.157 - - [08/Sep/2005:02:45:32 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 156 "-" "-"
    Code (apache):
     
    digitalpoint, Sep 9, 2005 IP
  7. alephito

    alephito Peon

    Messages:
    197
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks, Shawn. I will pass the info to the server administrator.
     
    alephito, Sep 9, 2005 IP
  8. alephito

    alephito Peon

    Messages:
    197
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Could you check what was happening at 02:00PM (or around the last call from our site to yours)? At 02:00AM we register our lowest traffic. Our peak is from 01:00PM to 6:00PM (EST).
     
    alephito, Sep 9, 2005 IP
  9. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #9
    This is the last of it (there were some after that but it was from Firefox, so someone was doing it manually)... Was using 0.000145 Mbit/sec at the time it was taken off.

    200.73.189.157 - - [08/Sep/2005:14:24:30 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 139 "-" "-"
    200.73.189.157 - - [08/Sep/2005:14:24:41 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 162 "-" "-"
    200.73.189.157 - - [08/Sep/2005:14:24:50 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 149 "-" "-"
    200.73.189.157 - - [08/Sep/2005:14:24:58 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 137 "-" "-"
    200.73.189.157 - - [08/Sep/2005:14:25:08 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 136 "-" "-"
    200.73.189.157 - - [08/Sep/2005:14:25:20 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 149 "-" "-"
    200.73.189.157 - - [08/Sep/2005:14:25:29 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 137 "-" "-"
    200.73.189.157 - - [08/Sep/2005:14:25:35 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 150 "-" "-"
    200.73.189.157 - - [08/Sep/2005:14:25:44 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 126 "-" "-"
    200.73.189.157 - - [08/Sep/2005:14:25:54 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 129 "-" "-"
    200.73.189.157 - - [08/Sep/2005:14:26:03 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 157 "-" "-"
    200.73.189.157 - - [08/Sep/2005:14:26:09 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 164 "-" "-"
    200.73.189.157 - - [08/Sep/2005:14:26:24 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 156 "-" "-"
    200.73.189.157 - - [08/Sep/2005:14:26:30 -0700] "GET /network.php?c=www.elaleph.com&type=link HTTP/1.0" 200 150 "-" "-"
    Code (apache):
     
    digitalpoint, Sep 9, 2005 IP
  10. alephito

    alephito Peon

    Messages:
    197
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #10
    OK, Shawn. Then Co-op has nothing to do with the strange bandwidth use.

    Thanks.
     
    alephito, Sep 9, 2005 IP
  11. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #11
    Nope... doesn't look that way to me. I checked my traffic graphs as well just to make sure, and I didn't see any spike or valleys to anything on this end (I definitely would notice a 1.5Mbit traffic variance).
     
    digitalpoint, Sep 9, 2005 IP
  12. alephito

    alephito Peon

    Messages:
    197
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Thanks again. As I told you before, you offer a terrific product and an incredible service.

    Regards.
     
    alephito, Sep 9, 2005 IP
  13. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #13
    Still doesn't explain what's happening to your cache (.txt) file though. The only thing I can think of (besides a quota issue) would be maybe your server isn't supporting flock() properly (that's what it uses to acquire a file lock) so maybe two processes are colliding and trying to write the file at once. Although I'm guessing it's not that because I would expect to see 2 requests for a new ad at the same time right before it gets wiped out, and I'm not seeing that, so...
     
    digitalpoint, Sep 9, 2005 IP
  14. alephito

    alephito Peon

    Messages:
    197
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #14
    That is right, Shawn. IIS does not handle flock() well.
     
    alephito, Sep 9, 2005 IP
  15. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,334
    Likes Received:
    2,613
    Best Answers:
    462
    Trophy Points:
    710
    Digital Goods:
    29
    #15
    I would still expect to see two HTTP requests at 08/Sep/2005:02:08:12 over here if there was a collision though.

    Maybe Windows/IIS *really* doesn't like flock() and just shredding the file even when there is no collision simply because it feels like it. :)

    If you wanted to try to run it without using flock() at all, comment the following 3 lines like so:

    // if (flock ($file, LOCK_EX|LOCK_NB, $would_block) && !$would_block) {
    PHP:
    //	flock ($file, LOCK_UN);
    	fclose ($file);
    //}
    PHP:
     
    digitalpoint, Sep 9, 2005 IP
  16. alephito

    alephito Peon

    Messages:
    197
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #16
    We commented the 3 lines, Shawn. We'll see. I remember other softwares, like UBB forum, where you should disable flock() if your system did not support it.

    And forget about the quota issue. We own a dedicated server and we do not have quota setted.
     
    alephito, Sep 9, 2005 IP
  17. alephito

    alephito Peon

    Messages:
    197
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #17
    The .txt file seems very stable so far. I guess commenting flock() was a good move.
     
    alephito, Sep 12, 2005 IP