本帖最后由 ITdesk 于 2024-8-13 14:41 编辑
黑群晖Docker Jellyfin优化
我用黑群晖搭建Docker Jellyfin已经很久了,也看了很多帖子,现在我把它们整理一下,方便后来人优化自己的Jellyfin
1.推荐使用国人优化版Jellyfin,能解决原版大部分问题,包括你的Intel核显驱动,他也是有的,直接启用就行
- https://hub.docker.com/r/nyanmisaka/jellyfin
复制代码
PS:如何在群辉docker 里面使用独显,请参考这个链接:群晖docker jellyfin 调用n卡(独显)驱动 ——恩山首发
2设置环境变量 全部修改为 zh_CN.UTF-8
3.进入docker查看环境变量是否生效,如何进入docker容器,偷懒的方式可以在黑群晖的容器界面进入(或者进入群晖ssh界面操作也行)
4.修改容器语言变量
- dpkg-reconfigure locales #修改语言变量,因为docker设置的不起作用,所以进容器手动设置一下
复制代码
这个界面一直回车直到看到314选项输入314回车,再输入3
5.刷新一下,然后查看变量是否生效
6.查看当前时间
时间不对可以使用下面的命令进行修正 - rm -rf /etc/localtime
- ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
复制代码
7.更改缓存目录(你们可以多加个ssd做个缓存用,然后把这个盘挂载到Jellyfin容器里面,然后再修改Jellyfin的缓存目录)
8.更改转码目录
9.测试硬盘的IOPS 我之前是把config文件夹与电影素材放到一个硬盘里,每次连接都会出现连接不上,断断续续,不流畅的问题,直到有一天我想测试一下硬盘的IOPS性能
ssh连接群辉,以管理员权限登录,危险操作!!! cd进到/volume2/16TB 这是我的盘,你自己多少就cd到哪里去,不要照抄
新建test文件夹
测试命令 - fio --filename=/volume2/16TB/test/testfile --size=10G --rw=read --bs=128k --ioengine=libaio --iodepth=32 --runtime=60 --eta-newline=1 --output-format=normal --name=simple-read-test
- fio --filename=/volume2/16TB/test/testfile --size=10G --rw=write --bs=128k --ioengine=libaio --iodepth=32 --runtime=60 --eta-newline=1 --output-format=normal --name=simple-read-test
- fio --filename=/volume2/16TB/test/testfile --size=10G --rw=read --bs=4k --ioengine=libaio --iodepth=32 --runtime=60 --eta-newline=1 --output-format=normal --name=simple-read-test
- fio --filename=/volume2/16TB/test/testfile --size=10G --rw=write --bs=4k --ioengine=libaio --iodepth=32 --runtime=60 --eta-newline=1 --output-format=normal --name=simple-read-test
复制代码
以下是其中一个输出,可以看到我读取了一个10T,IOPS,2976,读取速度在372MB,CPU基本上没有干什么活cpu : usr=0.13% - fio-2.13
- Starting 1 process
- simple-read-test: Laying out IO file(s) (1 file(s) / 10240MB)
- Jobs: 1 (f=1): [R(1)] [11.1% done] [372.0MB/0KB/0KB /s] [2976/0/0 iops] [eta 00m:32s]
- Jobs: 1 (f=1): [R(1)] [18.8% done] [351.0MB/0KB/0KB /s] [2808/0/0 iops] [eta 00m:26s]
- Jobs: 1 (f=1): [R(1)] [25.8% done] [375.4MB/0KB/0KB /s] [3003/0/0 iops] [eta 00m:23s]
- Jobs: 1 (f=1): [R(1)] [31.2% done] [328.0MB/0KB/0KB /s] [2624/0/0 iops] [eta 00m:22s]
- Jobs: 1 (f=1): [R(1)] [37.5% done] [352.0MB/0KB/0KB /s] [2816/0/0 iops] [eta 00m:20s]
- Jobs: 1 (f=1): [R(1)] [45.2% done] [400.2MB/0KB/0KB /s] [3201/0/0 iops] [eta 00m:17s]
- Jobs: 1 (f=1): [R(1)] [53.3% done] [374.0MB/0KB/0KB /s] [2992/0/0 iops] [eta 00m:14s]
- Jobs: 1 (f=1): [R(1)] [62.1% done] [420.0MB/0KB/0KB /s] [3360/0/0 iops] [eta 00m:11s]
- Jobs: 1 (f=1): [R(1)] [66.7% done] [352.9MB/0KB/0KB /s] [2822/0/0 iops] [eta 00m:10s]
- Jobs: 1 (f=1): [R(1)] [73.3% done] [310.6MB/0KB/0KB /s] [2484/0/0 iops] [eta 00m:08s]
- Jobs: 1 (f=1): [R(1)] [77.4% done] [326.0MB/0KB/0KB /s] [2608/0/0 iops] [eta 00m:07s]
- Jobs: 1 (f=1): [R(1)] [81.2% done] [235.0MB/0KB/0KB /s] [1880/0/0 iops] [eta 00m:06s]
- Jobs: 1 (f=1): [R(1)] [87.5% done] [262.0MB/0KB/0KB /s] [2096/0/0 iops] [eta 00m:04s]
- Jobs: 1 (f=1): [R(1)] [93.8% done] [318.0MB/0KB/0KB /s] [2544/0/0 iops] [eta 00m:02s]
- Jobs: 1 (f=1): [R(1)] [97.0% done] [234.0MB/0KB/0KB /s] [1872/0/0 iops] [eta 00m:01s]
- Jobs: 1 (f=1): [R(1)] [100.0% done] [234.0MB/0KB/0KB /s] [1872/0/0 iops] [eta 00m:00s]
- simple-read-test: (groupid=0, jobs=1): err= 0: pid=17531: Tue Aug 6 16:47:38 2024
- read : io=10240MB, bw=318117KB/s, iops=2485, runt= 32962msec
- slat (usec): min=12, max=93072, avg=401.80, stdev=2623.57
- clat (usec): min=0, max=124475, avg=12461.91, stdev=13173.08
- lat (usec): min=16, max=124493, avg=12863.76, stdev=13331.97
- clat percentiles (usec):
- | 1.00th=[ 446], 5.00th=[ 548], 10.00th=[ 1656], 20.00th=[ 7072],
- | 30.00th=[ 7776], 40.00th=[ 8096], 50.00th=[ 8384], 60.00th=[ 9408],
- | 70.00th=[10944], 80.00th=[11968], 90.00th=[28288], 95.00th=[41728],
- | 99.00th=[68096], 99.50th=[78336], 99.90th=[94720], 99.95th=[99840],
- | 99.99th=[109056]
- bw (KB /s): min=186368, max=485376, per=100.00%, avg=319873.38, stdev=77035.39
- lat (usec) : 2=0.01%, 20=0.01%, 50=0.01%, 100=0.01%, 500=3.76%
- lat (usec) : 750=1.81%, 1000=0.12%
- lat (msec) : 2=5.08%, 4=1.40%, 10=50.06%, 20=24.46%, 50=10.04%
- lat (msec) : 100=3.23%, 250=0.04%
- cpu : usr=0.13%, sys=7.66%, ctx=8865, majf=0, minf=1035
- IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=100.0%, >=64=0.0%
- submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
- complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.0%
- issued : total=r=81920/w=0/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0
- latency : target=0, window=0, percentile=100.00%, depth=32
- Run status group 0 (all jobs):
- READ: io=10240MB, aggrb=318116KB/s, minb=318116KB/s, maxb=318116KB/s, mint=32962msec, maxt=32962msec
复制代码
下面是4K的随机读取,可以看到IOPS就不是特别的稳定,证明他在读取4k的时候还是比较吃力,config文件里面多数都是小文件,导致jellyfin连接卡顿,超时 - fio-2.13
- Starting 1 process
- Jobs: 1 (f=1): [R(1)] [5.0% done] [144.0MB/0KB/0KB /s] [36.9K/0/0 iops] [eta 00m:57s]
- Jobs: 1 (f=1): [R(1)] [8.3% done] [115.0MB/0KB/0KB /s] [29.5K/0/0 iops] [eta 00m:55s]
- Jobs: 1 (f=1): [R(1)] [13.1% done] [116.0MB/0KB/0KB /s] [29.7K/0/0 iops] [eta 00m:53s]
- Jobs: 1 (f=1): [R(1)] [16.4% done] [175.0MB/0KB/0KB /s] [44.8K/0/0 iops] [eta 00m:51s]
- Jobs: 1 (f=1): [R(1)] [19.7% done] [212.0MB/0KB/0KB /s] [54.3K/0/0 iops] [eta 00m:49s]
- Jobs: 1 (f=1): [R(1)] [25.0% done] [481.0MB/0KB/0KB /s] [123K/0/0 iops] [eta 00m:42s]
- Jobs: 1 (f=1): [R(1)] [33.3% done] [394.0MB/0KB/0KB /s] [101K/0/0 iops] [eta 00m:32s]
- Jobs: 1 (f=1): [R(1)] [36.0% done] [112.0MB/0KB/0KB /s] [28.7K/0/0 iops] [eta 00m:32s]
- Jobs: 1 (f=1): [R(1)] [38.5% done] [152.0MB/0KB/0KB /s] [38.1K/0/0 iops] [eta 00m:32s]
- Jobs: 1 (f=1): [R(1)] [41.5% done] [150.0MB/0KB/0KB /s] [38.4K/0/0 iops] [eta 00m:31s]
- Jobs: 1 (f=1): [R(1)] [45.3% done] [302.0MB/0KB/0KB /s] [77.4K/0/0 iops] [eta 00m:29s]
- Jobs: 1 (f=1): [R(1)] [53.1% done] [352.9MB/0KB/0KB /s] [90.4K/0/0 iops] [eta 00m:23s]
- Jobs: 1 (f=1): [R(1)] [60.9% done] [323.0MB/0KB/0KB /s] [82.7K/0/0 iops] [eta 00m:18s]
- Jobs: 1 (f=1): [R(1)] [66.7% done] [261.0MB/0KB/0KB /s] [66.9K/0/0 iops] [eta 00m:15s]
- Jobs: 1 (f=1): [R(1)] [72.7% done] [318.4MB/0KB/0KB /s] [81.5K/0/0 iops] [eta 00m:12s]
- Jobs: 1 (f=1): [R(1)] [77.3% done] [236.0MB/0KB/0KB /s] [60.5K/0/0 iops] [eta 00m:10s]
- Jobs: 1 (f=1): [R(1)] [81.8% done] [226.0MB/0KB/0KB /s] [57.9K/0/0 iops] [eta 00m:08s]
- Jobs: 1 (f=1): [R(1)] [90.5% done] [197.2MB/0KB/0KB /s] [50.5K/0/0 iops] [eta 00m:04s]
- Jobs: 1 (f=1): [R(1)] [95.2% done] [216.0MB/0KB/0KB /s] [55.3K/0/0 iops] [eta 00m:02s]
- Jobs: 1 (f=1): [R(1)] [100.0% done] [247.0MB/0KB/0KB /s] [63.3K/0/0 iops] [eta 00m:00s]
- simple-read-test: (groupid=0, jobs=1): err= 0: pid=18198: Tue Aug 6 16:48:42 2024
- read : io=10240MB, bw=253696KB/s, iops=63423, runt= 41332msec
- slat (usec): min=0, max=247412, avg=15.23, stdev=747.36
- clat (usec): min=0, max=247459, avg=480.41, stdev=4125.22
- lat (usec): min=1, max=247461, avg=495.67, stdev=4191.51
- clat percentiles (usec):
- | 1.00th=[ 30], 5.00th=[ 30], 10.00th=[ 30], 20.00th=[ 30],
- | 30.00th=[ 30], 40.00th=[ 30], 50.00th=[ 31], 60.00th=[ 31],
- | 70.00th=[ 31], 80.00th=[ 32], 90.00th=[ 62], 95.00th=[ 1912],
- | 99.00th=[ 3376], 99.50th=[18560], 99.90th=[68096], 99.95th=[82432],
- | 99.99th=[134144]
- bw (KB /s): min= 6568, max=974080, per=100.00%, avg=257349.52, stdev=145168.29
- lat (usec) : 2=0.01%, 4=0.01%, 10=0.01%, 20=0.01%, 50=89.75%
- lat (usec) : 100=0.40%, 250=0.04%, 500=0.14%, 750=0.14%, 1000=0.16%
- lat (msec) : 2=5.07%, 4=3.59%, 10=0.09%, 20=0.15%, 50=0.27%
- lat (msec) : 100=0.17%, 250=0.02%
- cpu : usr=1.79%, sys=8.93%, ctx=8463, majf=0, minf=43
- IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=100.0%, >=64=0.0%
- submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
- complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.0%
- issued : total=r=2621440/w=0/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0
- latency : target=0, window=0, percentile=100.00%, depth=32
复制代码
给你们看下我固态硬盘的读取速度,你们心里就有数了 - fio-2.13
- Starting 1 process
- Jobs: 1 (f=1): [R(1)] [75.0% done] [3170MB/0KB/0KB /s] [25.4K/0/0 iops] [eta 00m:01s]
- Jobs: 1 (f=1): [R(1)] [100.0% done] [2894MB/0KB/0KB /s] [23.2K/0/0 iops] [eta 00m:00s]
- simple-read-test: (groupid=0, jobs=1): err= 0: pid=20077: Tue Aug 6 14:01:17 2024
- read : io=10240MB, bw=2563.9MB/s, iops=20510, runt= 3994msec
- slat (usec): min=12, max=7019, avg=40.54, stdev=111.50
- clat (usec): min=1, max=7825, avg=1269.84, stdev=486.53
- lat (usec): min=15, max=7839, avg=1310.42, stdev=488.87
- clat percentiles (usec):
- | 1.00th=[ 466], 5.00th=[ 596], 10.00th=[ 676], 20.00th=[ 860],
- | 30.00th=[ 1012], 40.00th=[ 1144], 50.00th=[ 1224], 60.00th=[ 1336],
- | 70.00th=[ 1480], 80.00th=[ 1624], 90.00th=[ 1832], 95.00th=[ 2064],
- | 99.00th=[ 2736], 99.50th=[ 3088], 99.90th=[ 3664], 99.95th=[ 5152],
- | 99.99th=[ 7648]
- bw (MB /s): min= 2125, max= 3232, per=100.00%, avg=2954.21, stdev=411.14
- lat (usec) : 2=0.01%, 20=0.01%, 50=0.01%, 250=0.01%, 500=2.37%
- lat (usec) : 750=11.36%, 1000=15.68%
- lat (msec) : 2=64.42%, 4=6.08%, 10=0.08%
- cpu : usr=0.93%, sys=68.19%, ctx=6421, majf=0, minf=1034
- IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=100.0%, >=64=0.0%
- submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
- complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.1%, 64=0.0%, >=64=0.0%
- issued : total=r=81920/w=0/d=0, short=r=0/w=0/d=0, drop=r=0/w=0/d=0
- latency : target=0, window=0, percentile=100.00%, depth=32
- Run status group 0 (all jobs):
- READ: io=10240MB, aggrb=2563.9MB/s, minb=2563.9MB/s, maxb=2563.9MB/s, mint=3994msec, maxt=3994msec
复制代码
10.推荐好用的安卓app
- https://github.com/jarnedemeulemeester/findroid
复制代码
11.jellyfin的文件命名
电影
电视剧
- video\动漫\一念永恒\S01\一念永恒 S01E01.mp4
复制代码
12.推荐好用的jellyfin插件
刮削插件
- https://github.com/cxfksword/jellyfin-plugin-metashark
复制代码
跳过片头插件
- https://raw.githubusercontent.com/ConfusedPolarBear/intro-skipper/master/manifest.json
复制代码
以前写的帖子全在下面,有兴趣自取
|