silverwind / droppy

**ARCHIVED** Self-hosted file storage
BSD 2-Clause "Simplified" License
1.62k stars 196 forks source link

Excessive memory usage when opening large pdf file #399

Open swwind opened 4 years ago

swwind commented 4 years ago

When I try to open a large pdf file(800+ pages) in Droppy, my RAM usage suddenly increased rapidly just like what happened in #387.

Tested on archlinux with Google Chrome 80.0.3987.132.

Here is that scary book: ComputerNetworks.pdf

zoof commented 4 years ago

I've experienced this myself.

jyundt commented 4 years ago

I can confirm I'm hitting the same behavior; opening a multi page PDF will consume all available host (and GPU) memory and eventually wedge my desktop. Using nvidia-smi, I can see that opening a small PDF (~2 pages) will consume ~2GB of GPU memory. This is the Chrome PID consuming all GPU memory:

/opt/google/chrome/chrome --type=gpu-process --field-trial-handle=14861158379448695967,10571079169687825361,131072 --enable-crash-reporter=bb6ddb08-####-####-####-############, --gpu-preferences=MAAAAAAAAAAgAAAQAAAAAAAAAAAAAAAAAABgAAAAAAAQAAAAAAAAAAAAAAAAAAAACAAAAAAAAAA= --shared-files

I get roughly the same behavior with Firefox, except no GPU memory consumption.

OS: CentOS 7.8 Kernel: 3.10.0-1127.19.1.el7.x86_64 Nvidia driver: 455.23.05 Browser: Chrome 85.0.4183.121 or Firefox 68.12.0esr Droppy container: 12.2.0

This is very easy for me to reproduce, I'm happy to provide additional debugging info.