mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 13:26:00 +03:00
[GH-ISSUE #95] Must wait for video to copy before streaming in AMS #59
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hterhanian on GitHub (Dec 11, 2014).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/95
I'm surprised I wasn't able to find any info about this since s3fs is offered as the solution for streaming content from S3 with Adobe Media Server (AMS).
I saw an issue from s3fs on code.google.com that talks about this problem and gives a possible solution here: Issue 350: Opening for READ ONLY could be optimized.
Basically, content must be copied entirely to local instance from S3 before AMS will start playback. This becomes a problem with larger movie file sizes because there will always be a lag time for the movie to copy before AMS can start streaming it.
Could there be mount option that allows file to be read once a configurable amount of the file is copied? On top of this, I would also like to see this feature allow moving to different parts of the file before the entire thing is downloaded.
@ggtakec commented on GitHub (Jan 6, 2015):
I'm sorry for replying late.
When s3fs gets(downloads) the object with use_cache option, s3fs caches the object.
The cache file is separated by parts, so you can specify bytes for one parts by fd_page_size option.
Can you solve this problem by using this option?
Regards,
@hterhanian commented on GitHub (Jan 7, 2015):
I tried reducing page size and increasing parallel transfers but since pagesize must be smaller than multipartsize times maxparallelcount, and multipartsize is hardcoded to 10mb, I could not decrease page size while increasing parallel count.
Also this point might be moot, when I tried any configuration of s3fs... I monitored real time traffic and saw that whenever trying to do VOD with flash media server, the stream would not start until it looked like traffic between ec2 instance and s3 bucket stopped (meaning the movie was copied over to local s3fs cache). I increased multipart_size and parallel_count in hopes of decreasing the time it takes to copy the movie but I could only get it down to around 25 seconds for 2.5GB. For my situation, streaming needs to start in at most 5 seconds. I tried searching everywhere for someone in this situation and I'm surprised to say that I saw no one talk about how slow VOD starts when using FMS/AMS and s3fs even though Adobe recommends s3fs when streaming from S3.
Thanks,
-hd
@ggtakec commented on GitHub (Jan 13, 2015):
Do you need to load all of the video file before starting streaming?
If you need, probably I think that you should increase parallel connection and use more traffic by s3fs options for loading 25Gb file.
(Is 5Gbyte/sec posssible?)
(About just idea by multi process and read from cache, if it is possible.
When starting download(streaming), run another process.
Another process reads the object and puts cache, and main process for VOD reads from cache.....)
@vijvijay commented on GitHub (May 9, 2015):
@hterhanian, since the get operation is blocking, you need to get the entire file to cache before accessing it.
BUT, you may still do it under 5s. As you say 25s for 2.5GB (which translates to ~800Mbps), I can see the speed is limited by the virtual network card (1Gbps). You can increase it by adding more virtual network interfaces(ENI) to the virtual machine. By adding 4 more virtual network interfaces to your VM and configuring network appropriately, your VM's network speed should increase and file download/cache time should drop by 5X, reducing the opening time to your expected 5s from the current 25s.
PS: See this link: http://www.aerospike.com/blog/boosting-amazon-ec2-network-for-high-throughput/
@gaul commented on GitHub (Sep 26, 2020):
@ggtakec s3fs does a synchronous read-ahead on when reading at a given offset. This is a poor fit for streaming reads that video players do. Instead, s3fs should issue an asynchronous prefetch when the applications reads 50% of the previous buffer.