Serving big files at constant rates

Hi,

A recent thread kept my attention recently:

I don’t have such a big trouble, but I don’t see how to solve it.

My server usually serves small files suchas classical web pages.
On a particular location, though, I serve big files (around 100MB+).

I noticed that when those files were served, there was ‘bumps’ in the
transfer rate, whether the trasnfer stalled for 1s or the transfer rate
downgraded to 500Kb/s during the same period.
Those bumps were monitored server-side, so it is not some trouble in any
network in the middle.
I ensured that the only service using significant bandwith would be
Nginx.

I guess I am experiencing some disk I/O speed limitations.
Thus, I tried to use aio on that location:
aio on;
directio 4m;
output_buffers 1m; (I tried 512k first hand)

The bumps are still there, appearing randomly but quite often and
regularly
on the long shot.

What kind of I/O trouble is that?

Thanks,

B. R.

Hi,

I tried that, but I only see these consequences:

  • Higher peek transfer speed (up to 1.1/1.2 MiB/s)
  • Higher instability (bumps down to 300/400 KiB/s and with longer
    duration)
  • Lower average transfer rate overall

Well, does that mean I have some network interfaces trouble?

B. R.

Why not create a 1gb ramdrive to make sure it is a disk IO issue. It
might be a lan driver buffer issue.

Posted at Nginx Forum:

Could very well be a lan driver issue, rx/tx values too high or rx value
higher then tx, flow control not used or used but not supported,
etc… try an older driver or if its really old a newer one. Also see
if you can get a driver with debugging compiled in or support for raw
mode and run something like wireshark to see whats going on.

Posted at Nginx Forum: