Jump to content

Windows scanning much, much faster than Linux


wickedlemon

Recommended Posts

wickedlemon

I did start another post about slow scanning, but this was Raspberry Pi specific, so I though I'd post here.

 

After installing Emby on Raspbian I discovered it was incredibly slow scanning compared to my Windows PC. In an effort to rule out the Pi, I decided to install Ubuntu on to my laptop and run Emby there too and compare. After about six hours scanning both Linux scans are slow and pretty much neck and neck. Although it lists the series, I still only have two playable scanned episodes.

 

In desperation I wiped my Windows library. Deleted all cache, metadata and library files restarted a scan. Within 2 minutes Windows had achieved more than Linux had all day. I now have well over 300 episodes available in maybe 15 minutes.

 

So has anyone else noticed this issue? I'd be interested if anyone else can compare Windows vs Linux scanning speed to see how it compares.

 

All three Emby installs are set up with identical settings, running 4.0.1.0.

 

Link to comment
Share on other sites

PenkethBoy

Nope both work approx the same for me

 

for the same media (copy)

 

windows (2012r2 with i7 pooled disks) 1 min 29 secs for scan

 

qnap (celeron raid5) 1 min 38 secs for scan

 

This is with 4.1 beta but this is consistent with what i have seen for months

 

I would post (attach) your logs from the scans so Luke etc can have a look as sounds like something is up

 

Also describe you library setup and the machine hardware (windows and linux machine you used) as that could add variability

 

More info the better - the odd screenshot would help as well

Link to comment
Share on other sites

wickedlemon

Interesting to know.

 

I posted lots of logs for Luke in my other post. TBH the Windows machine is faster, but not by much. Not enough for the difference shown. I think I'll install Emby on the laptop running Win8/Ubuntu dual boot and see what happens.

Link to comment
Share on other sites

wickedlemon

Just started running a scan from my laptop under Windows 8 and it's adding stuff as fast as on my desktop, so Ubuntu and Windows on the same hardware are miles apart in scanning speed. I'll add logs once the scan has finished.

 

Windows 8 scan finished in 4m46s. Linux still at 86.4% and doesn't even have 1 episode viewable yet.

Edited by wickedlemon
Link to comment
Share on other sites

mastrmind11

According to the logs, you've got some network/cert/auth issues to work out on your pie.  Your log is filled with the below, and the library scan is unable to proceed.

2019-01-29 16:43:52.611 Info HttpServer: HTTP GET http://192.168.1.41:8096/emby/ScheduledTasks?isHidden=false. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
2019-01-29 16:43:52.625 Error HttpServer: Access token is invalid or expired.

Your Win8 logs are clean, and scanning properly.

 

edit:  also, disable DLNA on your pie.

Edited by mastrmind11
Link to comment
Share on other sites

wickedlemon

According to the logs, you've got some network/cert/auth issues to work out on your pie.  Your log is filled with the below, and the library scan is unable to proceed.

2019-01-29 16:43:52.611 Info HttpServer: HTTP GET http://192.168.1.41:8096/emby/ScheduledTasks?isHidden=false. UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
2019-01-29 16:43:52.625 Error HttpServer: Access token is invalid or expired.

Your Win8 logs are clean, and scanning properly.

 

edit:  also, disable DLNA on your pie.

 

Thanks for the reply.

 

Not entirely sure how to fix the httpserver error as it seems to be a client connection issue, not server. Searched the forum and found this: 

 

https://emby.media/community/index.php?/topic/42176-access-token-is-invalid-or-expired/

 

In Luke's own words, this error isn't an issue.

 

Everything to do with DLNA is turned off in Emby. What else do I need to do?

Link to comment
Share on other sites

mastrmind11

I can't see how it's not an issue.  Literally 90% of your log is filled with them, which would likely explain why the pi isn't progressing.  @@Luke

Link to comment
Share on other sites

wickedlemon

I can't see how it's not an issue.  Literally 90% of your log is filled with them, which would likely explain why the pi isn't progressing.  @@Luke

 

Hi. I've checked the logs. The IP is for my main PC, which is the one I'm currently viewing the web interface on. Why this is giving an error? No idea. 

 

If you check my logs on this thread, you won't see these errors as I made sure my client wasn't connected so it avoided adding all the polling log entries. Still dog slow

 

https://emby.media/community/index.php?/topic/68467-slow-almost-non-existent-scan/

 

I'll rotate the log, close my client window and re-upload a log in a bit. The scan is still going on.

Link to comment
Share on other sites

So one is a desktop PC and the other is Raspberry Pi? That's a pretty significant gap in horsepower, no?

Link to comment
Share on other sites

wickedlemon

So one is a desktop PC and the other is Raspberry Pi? That's a pretty significant gap in horsepower, no?

 

Hi Luke

 

Yes one was a Pi and one a desktop.

 

So I installed Ubuntu on my laptop and compared it against the Pi. Neck and neck.

 

I ran Emby on Windows on my laptop and it is lightning fast. Exactly the same hardware and network connection. 

 

So no, this is not a horsepower issue. It is Windows vs Linux in my environment.

 

Please stop with 'it's only a pi' responses. The Pi isn't even breaking a sweat when it's scanning.

Link to comment
Share on other sites

wickedlemon

OK. Here's the log with no clients connected. This is 45 minutes worth!

 

I logged back in and the scan is at 86.9%.

 

So it's scanned 1 file.

 

In case it helps. I've turned on debug logging, rebooted and restarted the scan. I'll post that log up later.

embyserver.txt

Edited by wickedlemon
Link to comment
Share on other sites

wickedlemon

These are only very small startup logs and don't contain much information.

 

Maybe it doesn't contain much information because Emby isn't doing much? That's over an hour of log during which Emby was scanning.

 

Did you see my logs in the other post? You asked me to post logs for a complete scan of a small library so I put up logs for 1 file, 2 file, 3 files etc.

 

What would you like me to do to help you analyse this?

 

Attached is the log from midnight, when it rotated last, to now - so nearly 7 hours. Emby is still scanning and still hasn't got very far. Remember Windows completed this folder in under 5 minutes!

 

5c51496888631_Capture.jpg

embyserver.txt

Link to comment
Share on other sites

wickedlemon

Is the one initial scan and the other a subsequent scan?

 

It's never completed an initial scan, so they are from varying points in the scan process. I did reboot to enable debugging ad it picked up from where it left off. The scans at the top of this post should show the start of the scan. Will it help if I clear the library and start a first scan with debugging on? How long would you like me to leave it running to give you enough log info?

Link to comment
Share on other sites

wickedlemon

Yes that would be helpful, thanks.

 

OK, I'll do that. How long a log do you want (time-wise)? Since the scan won't actually finish for weeks.

Link to comment
Share on other sites

wickedlemon

I've installed 4.1.0.5.

 

Tried scanning again and it's still seems slow. I'll post a log up later once it's been running a bit longer.

 

What I did try in the meantime was copying some files to a USB stick and scanning. That was really fast. 12 episodes done in seconds.

 

So:

 

Ubuntu  > Nas = very slow

Raspbian > Nas = very slow

Raspbian > USB = very fast

Windows 8 > Nas = fast

Windows 10 > Nas = fast

 

I have no issues copying files or playing media from the NAS on Linux devices, so what could be going on? We're not talking a bit slower but 100s of times slower. As I've mentioned earlier Kodi native library scan speeds running on Windows vs Linux are pretty similar.

Edited by wickedlemon
Link to comment
Share on other sites

wickedlemon

Progress!

 

Decided to try mounting my box using cifs instead of nfs and it's now much much faster scanning. There's obviously still an issue with Emby as there is no speed issue using nfs mounts in the OS and nfs should in theory be quicker. I'll post up the cifs vs nfs logs later.

Link to comment
Share on other sites

mastrmind11

Odd.  I am using nfs mounts from ubuntu server to ubuntu NAS and it's as fast as it's supposed to be.

Link to comment
Share on other sites

wickedlemon

Odd.  I am using nfs mounts from ubuntu server to ubuntu NAS and it's as fast as it's supposed to be.

 

Weird. Definitely not that way for me. I use nfs shares in Kodi with no issue so no idea why it would be slower.

 

All I've done between these scans is delete the library.db, cache and metadata folders and changed  the mounts in fstab from nfs to cifs

 

Here's the scan logs for nfs vs cifs mounts.

embyserver_debug_nfs.txt

embyserver_debug_smb.txt

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...