If your site creates many new files on disk, such as files uploaded by visitors, consider these performance improvements:
FileStream.SetLengthto avoid fragmentation
Writing bytes sequentially without moving the read/write head happens much faster than random access. If you are only writing the files and not reading them, try writing them on a dedicated disk drive using a single dedicated thread. That way, other processes won't move the read/write head on the drive.
If multiple threads write files at the same time, space used for those files will become interleaved, leading to instant fragmentation. ...