SydMontague / ImageMaps

draw images on maps
MIT License
44 stars 28 forks source link

Slow server start up. #24

Closed goosesima closed 3 years ago

goosesima commented 3 years ago

[13:46:51 INFO]: [ImageMaps] Enabling ImageMaps v1.0.5 [13:51:49 INFO]: [NoteBlockAPI] Enabling NoteBlockAPI v1.6.1-SNAPSHOT

ImageMaps takes 7+ minutes to enable! Totally my server need 10 minutes to starts(with ImageMaps). 70% eats time of start up server. Server using 470 build PaperMC. And have 38 plugins.

SydMontague commented 3 years ago

How many images do you have? What kind of storage do you use (HDD/SSD/NVMe)?

goosesima commented 3 years ago

I have totally 50 images (~17,5 Megabytes) I uploaded my maps.yml to PasteBin: https://pastebin.com/raw/vW0vN6pF

SydMontague commented 3 years ago

My server has a comparable number of maps and images and the plugin takes <1s to start on an NVMe drive.

However, I notice most of your images are scaled, which could cause some extra computation being done at startup. I strongly recommend against using the built-in scaling where it can be avoided, since quality will suffer from it.

goosesima commented 3 years ago

Can you please add like config parameter what scaling to lower(to Map resolution) automatically if it prevent long loading.

SydMontague commented 3 years ago

You still haven't answered my question about the storage medium your server is running on. While we're at it, the CPU used is probably useful as well.

goosesima commented 3 years ago

I'm using Google Drive mounted to folder. Folder contains plugins, server core, everything what need for server. But for example worlds chunks load have not take many time.

goosesima commented 3 years ago

lscpu

Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              2
On-line CPU(s) list: 0,1
Thread(s) per core:  2
Core(s) per socket:  1
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               63
Model name:          Intel(R) Xeon(R) CPU @ 2.30GHz
Stepping:            0
CPU MHz:             2299.998
BogoMIPS:            4599.99
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            256K
L3 cache:            46080K
NUMA node0 CPU(s):   0,1
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt arat md_clear arch_capabilities
SydMontague commented 3 years ago

Please try how long the server takes to boot with all the files in local storage. Running a server via a network mounted folder sounds like a terrible idea performance wise.

goosesima commented 3 years ago

I don't know but when I downloaded server to my PC and start up, console says Image file stalker not found. Removing map!, there is many messages said this. But in folder '\plugins\ImageMaps\images' is many images. See part of console output: https://pastebin.com/raw/eVqJzmVn

SydMontague commented 3 years ago

It either fails to read the images or it can't find them. Do they use mixed case letters? Can you place them when ingame?

goosesima commented 3 years ago

Some of them use mixed case letters. I can place images, but stalker doesn't work but stalker.jpg works. Other images also works.

goosesima commented 3 years ago

40s minutes takes to run on HDD.

SydMontague commented 3 years ago

40s sounds a lot more sensible and supports my suspicion that it's your Google Drive setup that causes the long loads.

You might want to store the data locally on your server instead and then just sync it with the Google Drive. Accessing files via the Internet is really slow in computer terms and the plugin has access quite a few on startup—which adds up.

goosesima commented 3 years ago

Okay, I will try directly from hard drive. Can you please add support for languages files for plugin?