0

When I'm downloading a file (torrent) and playing a video, my video will periodically freeze. The video uses the GPU and barely the CPU, the total CPU usage isn't anywhere near 50% when I'm doing these two activities.

I'm wondering what the bottleneck is, and if there is anything I can do to improve it. Reducing the download speed didn't seem to help.

8
  • perhaps you should be asking how to identify the cause of a bottleneck? ... where is the video originating?
    – jsotola
    Sep 13 at 0:27
  • both are using the micro sd card
    – deanresin
    Sep 13 at 0:42
  • are you saying that the torrent is downloading to an SD card and the video is playing from the same SD card?
    – jsotola
    Sep 13 at 0:48
  • yes they are both using the same sd card. Maybe that is the bottleneck? I'm wondering now if I download to my external drive if it first gets buffered on the sd card.
    – deanresin
    Sep 13 at 0:55
  • 1
    What I meant was, if you were playing a video off the SD card and downloading a torrent to an external drive, the torrent data would not be buffered/cached on the SD card -- which AFAICT re-reading the question and previous comments was what you were asking in comment #4: "if I download to my external drive if it first gets buffered on the sd card" = No, or at least there is no need for that to happen (it's possible, of course, but I doubt very much the relevant software is implemented that way). Anyway, glad you found a solution.
    – goldilocks
    Sep 23 at 14:07
1

Virtually all modern torrent clients use some sort of internal caching to improve performance. If the cache is large, there will be a noticeable slowdown when it expires or is flushed.

Try running your torrent client with nice and try setting a smaller cache size with a shorter expiry time. If you primarily use the Pi for downloads, long expiry time is simply counter-productive.

There's also a cache setting in video players, if the bottleneck is the SD card then caching 10 or so seconds of video to RAM should help.

2
  • My transmission-daemon is using a cache size of only 4MB by default.
    – deanresin
    Sep 13 at 16:59
  • Have you tried nice nevertheless? Sep 14 at 11:14
1

The bottleneck was the SD card. When I used an external USB drive to download and play from, the stutters stopped.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.