Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Bandwidth vs Latency - Which one is more important for PHP Web Applications?
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Bandwidth vs Latency - Which one is more important for PHP Web Applications?

EthanZouEthanZou Member
edited April 2023 in General

Comments

  • cplicensenetcplicensenet Member, Patron Provider

    Both are equally important.

    If you have a great PHP application with fine-tuned codes and either your bandwidth/latency is the bottleneck, the performance is affected.

  • @cplicensenet said:
    Both are equally important.

    If you have a great PHP application with fine-tuned codes and either your bandwidth/latency is the bottleneck, the performance is affected.

    So for LET, which one might be the bottleneck? BW?

  • You should focus on reducing packet loss.

    Without packet loss, you can avoid network-related performance problems.

  • NeoonNeoon Community Contributor, Veteran

    @EthanZou said:

    @cplicensenet said:
    Both are equally important.

    If you have a great PHP application with fine-tuned codes and either your bandwidth/latency is the bottleneck, the performance is affected.

    So for LET, which one might be the bottleneck? BW?

    The bottleneck on LET, is Vanilla.
    You can't blame that on PHP.

    Thanked by 1noisycode
  • PulsedMediaPulsedMedia Member, Patron Provider

    Processing power.

    Most sites would be fine with say 10Mbps and 250ms latency, but it's the processing time people absolutely hate. With no media, text only even 10Mbps is a lot of BW.

    But ofc, we these days like to have each page load take like 1+MiB so 1Gbps is a good idea regardless :)

  • @chihcherng said:
    You should focus on reducing packet loss.

    Without packet loss, you can avoid network-related performance problems.

    Yes, that does matter. And how about latency?

    @Neoon said:

    @EthanZou said:

    @cplicensenet said:
    Both are equally important.

    If you have a great PHP application with fine-tuned codes and either your bandwidth/latency is the bottleneck, the performance is affected.

    So for LET, which one might be the bottleneck? BW?

    The bottleneck on LET, is Vanilla.
    You can't blame that on PHP.

    So it's processing power @PulsedMedia :) neither bandwidth nor latency?

    @PulsedMedia said:
    Processing power.

    Most sites would be fine with say 10Mbps and 250ms latency, but it's the processing time people absolutely hate. With no media, text only even 10Mbps is a lot of BW.

    But ofc, we these days like to have each page load take like 1+MiB so 1Gbps is a good idea regardless :)

    With good processing power, latency isn't important anymore? for LET?

  • tentortentor Member, Patron Provider

    I think your question is a bit incorrect. The requirements really depend on the type of an application - for the blog you won't (and really, please, don't) serve static content using PHP - it should be handled by appropriate software (nginx for example) or even using CDN (they are really good in it). Latency is really important if you host real-time/online game, where interactivity really depends.

  • PulsedMediaPulsedMedia Member, Patron Provider

    @EthanZou said: With good processing power, latency isn't important anymore? for LET?

    That's the general bottleneck, people are typically fine to load sites from high latency pages since a lot of it is parallel, the initial loading time when browser starts receiving is most important, after that the importance lessens.

    But many sites can take seconds to generate the page (poorly optimized code), so network latency is secondary.

    It is and is not important in that sense. One should strive for less than 3second pageloads always, and in interactive stuff latency of course is very important.

    But forum like LET? Nawh network latency is not important, it's the page rendering time.

  • @tentor said: Latency is really important if you host real-time/online game, where interactivity really depends.

    So it's not important for LET? Both US and EU servers all work fine?

    @PulsedMedia said: But forum like LET? Nawh network latency is not important, it's the page rendering time.

    Many thanks for your guide! Sir
    So for US end users, there is no difference in whether LET's servers are located in the US, Europe, or anywhere else?

  • PulsedMediaPulsedMedia Member, Patron Provider

    @EthanZou said:

    @tentor said: Latency is really important if you host real-time/online game, where interactivity really depends.

    So it's not important for LET? Both US and EU servers all work fine?

    @PulsedMedia said: But forum like LET? Nawh network latency is not important, it's the page rendering time.

    Many thanks for your guide! Sir
    So for US end users, there is no difference in whether LET's servers are located in the US, Europe, or anywhere else?

    Not to a large degree, i would still recommend choosing somewhat central location, but it should not be the primary decision factor.

    Something like this, on per dollar basis:
    - Processing power: 37.5%
    - RAM + Storage Type (IOPS): 47.5%
    - Location: 15%

    IOPS is the most critical factor for databases, along with RAM. Weights are examples, a pure guess without profiling the actual load and code performance.

    The better optimized code, the more the weights go towards RAM + IOPS, and especially RAM capacity.

    Even CPUs from 8 years ago (DDR3 era) are so freakishly fast that efficient code will bottleneck on amount of RAM and IOPS you have far sooner that CPU. BUT, it all depends on how well optimized the code is.

    Hence profiling is important.

    Also, the biggest factor, even beyond the HW + Location is server software configs. These alone can make multiple orders of magnitude difference.

    For several customers we have solved their drastic performance issues in manner of minutes, while decrease their hosting costs 95% -- by simply going through their config. One site all i did was blind edit their apache config and they immediately cancelled 67-75% of their servers as unneeded. For another site i identified the bottleneck as linux kernel (certain types of syscalls, pointers etc. can be limiter), so instead of like 200+€ a pop servers and having half a dozen of them their system has been running on like less than 50€ a month worth of VPSs ever since.

  • AXYZEAXYZE Member

    Latency tells you how fast user will start to get data from your website.
    Bandwidth tell you how fast it can push bytes to client.
    Both are important, but for lighter sites latency will be more important (because there is not much data to send), for heavy sites (for example video hosting) bandwidth will be more important.

    Remember that with heavy latency its difficult to use all of your bandwidth, because of network congestion, long routes, limitations of protocols.

    For example if you have 10Gbit server in Europe, you will likely see only 1-2Gbps to various locations in USA. That's why for worldwide app it is better to have multiple different servers all around the world and load balance between them instead of single beefy server. If you are serving only one country then single high bandwidth server may be better value choice.

  • AXYZEAXYZE Member
    edited April 2023

    @EthanZou said:

    @cplicensenet said:
    Both are equally important.

    If you have a great PHP application with fine-tuned codes and either your bandwidth/latency is the bottleneck, the performance is affected.

    So for LET, which one might be the bottleneck? BW?

    If anything didn't changed then LET is still hosted on single DigitalOcean instance in US with second instance acting as fail-over. Not because its fastest or best value, but because its simple to maintain and "good enough" in all metrics.
    This may answer many of your questions.

  • @AXYZE said:

    @EthanZou said:

    @cplicensenet said:
    Both are equally important.

    If you have a great PHP application with fine-tuned codes and either your bandwidth/latency is the bottleneck, the performance is affected.

    So for LET, which one might be the bottleneck? BW?

    If anything didn't changed then LET is still hosted on single DigitalOcean instance in US with second instance acting as fail-over. Not because its fastest or best value, but because its simple to maintain and "good enough" in all metrics.
    This may answer many of your questions.

    Do you know the VPS specs?

  • @PulsedMedia said:

    @EthanZou said:

    @tentor said: Latency is really important if you host real-time/online game, where interactivity really depends.

    So it's not important for LET? Both US and EU servers all work fine?

    @PulsedMedia said: But forum like LET? Nawh network latency is not important, it's the page rendering time.

    Many thanks for your guide! Sir
    So for US end users, there is no difference in whether LET's servers are located in the US, Europe, or anywhere else?

    Not to a large degree, i would still recommend choosing somewhat central location, but it should not be the primary decision factor.

    Something like this, on per dollar basis:
    - Processing power: 37.5%
    - RAM + Storage Type (IOPS): 47.5%
    - Location: 15%

    IOPS is the most critical factor for databases, along with RAM. Weights are examples, a pure guess without profiling the actual load and code performance.

    The better optimized code, the more the weights go towards RAM + IOPS, and especially RAM capacity.

    Even CPUs from 8 years ago (DDR3 era) are so freakishly fast that efficient code will bottleneck on amount of RAM and IOPS you have far sooner that CPU. BUT, it all depends on how well optimized the code is.

    Hence profiling is important.

    Also, the biggest factor, even beyond the HW + Location is server software configs. These alone can make multiple orders of magnitude difference.

    For several customers we have solved their drastic performance issues in manner of minutes, while decrease their hosting costs 95% -- by simply going through their config. One site all i did was blind edit their apache config and they immediately cancelled 67-75% of their servers as unneeded. For another site i identified the bottleneck as linux kernel (certain types of syscalls, pointers etc. can be limiter), so instead of like 200+€ a pop servers and having half a dozen of them their system has been running on like less than 50€ a month worth of VPSs ever since.

    Thank you very much! I seem to have gained some understanding.

    @AXYZE said: but for lighter sites latency will be more important (because there is not much data to send)

    Just like LET?

    for heavy sites (for example video hosting) bandwidth will be more important.

    Just like youtube?

    @AXYZE said: Not because its fastest or best value, but because its simple to maintain and "good enough" in all metrics.

    Well, it's not very good, is it?

Sign In or Register to comment.