0
Searching answer

Perf issue on Raspberry Pi 2 with HD comics

Eric Savolle 9 years ago updated by Tom 9 years ago 4
As my old linux ebook died, I've moved my Ubooquity server on a Raspberry Pi 2.

I'm running through some perf issues with HD comics (pages whose width bigger than 1024)

here some loading times
comics WxH
1024 x 1575 => about 1 s to load new page
1444 x 2220 => about 3 s
1988 x 3058 => about 5 s, up to 10 s

The loading times are between unbuffered pages, in all cases the next buffered one is displayed quickly (1 s).

Issues are the same on the rpi browser, on my main computer, on my android devices.
I've tried OPDS with Challenger Comics, same issues, even badder (was running fine with my previous ebook)

I've tried to increase Heap Size to 512M (Xmx512m), same issue.
I've tried to overclock Pi 2 to 900Mhz, same issue.

By the way the Cpu load is not big , always around 25%-50%.
And the logs show no error neither exception.

So I'm stuck...
Any idea ?
Or do I have to downscale all my comics :( ?
Under review
Since you have the problem in the Pi browser itself, I suppose network congestion is not its cause. Two lengthy steps remain: extraction from the archive and resizing/reencoding.
Extraction can be slowed down by file system (are your comics hosted on the Pi memory card or on a network drive ?) and by CPU.
Resizing/reencoding rely only on CPU.

The CPU load of 25/50% is probably because only one of the cores is used to unzip or resize the image. So having a 25% load means a 100% utilization of a single core.

I'm guessing performances were fine even for big pages on your previous device, right ? What kind of machine was it (more specifically what kind of CPU) ?
Searching answer
Comics are hosted on a USB Drive ( My Passport) through a powered USB hub.
I've tried with files on Pi memory card, same issue.

I've checked with top, one or two cores are being used mainly up to 100%.

My previous device was EEEPC 1005HA ( Intel Atom N280 1.66GHz) running xubuntu 12.04 with 2GB of RAM. Comics were hosted on same USB drive.
Performance was indeed fine even for big pages.

I've installed mcomix just to check and big pages are loading fine.

I don't know much about CPU performances, but I guess the ARM CPU of the Pi 2 is not as fast as the Atom you were using before.

I will have to do a few tests on my own Raspberry Pi (an "A" version, the slowest that exists, so I should be able to reproduce the problem easily) to determine which step is the most CPU intensive (extraction or page resizing). I also have plans to allow direct file download in the online reader (without conversion): combined with native extraction tool, the performance boost could be quite noticeable.