perryhuynh / kcauto

kcauto, the successor to kancolle-auto, a Kantai Collection (Kancolle) bot/automation tool
GNU General Public License v3.0
68 stars 22 forks source link

Kancolle HTML5 on VM #215

Open Danielosama opened 5 years ago

Danielosama commented 5 years ago

Not really an issue with KCAuto itself, but I'm looking for some advice. Ever since the HTML5 update, KC on the VM is incredibly laggy. I realized that the game was using 100% of the CPU (the "virtual" one so to speak) at all times. I've tried with different viewers and Chrome based browsers, but the result is the same. I'd like to know if someone is playing the game on a VM and has no issues, what their settings are. I'm using Oracle VM Virtualbox btw. Thanks for the answers.

stackhanovets commented 5 years ago

@Danielosama ,

To append #210 , I have the following VM setup: Win7, VMware Workstation Pro 14, 4 cores, 4 Gb RAM, GTX 740 with 1Gb assigned, 60 Gb on SSD drive with disabled swap and graphical acceleration on default value. Everything seems fine.

Danielosama commented 5 years ago

@stackhanovets ,

stackhanovets commented 5 years ago

Holy moly, does Win7 with classical theme and no updates installed consume less resources than Xubuntu 16.04?

1

@Danielosama , I suppose it's time to upgrade something.

Danielosama commented 5 years ago

@stackhanovets Well, I can't assign more than 128MB of video memory because VirtualBox doesn't have that option, maybe I should try VMware Workstation Pro. I can assign more RAM no problem, but my current CPU has 4 cores, so of course I can't put all of them into the VM. I have an Intel Core i5-7600K 3.8GHz, I doubt that's not enough to run a single VM for KC x(

stackhanovets commented 5 years ago

4 cores, so of course I can't put all of them into the VM.

@Danielosama I do not use VirtualBox for a while, but with VMware Workstation I can do it easily without any visible impact on working host applications.

Danielosama commented 5 years ago

@stackhanovets Well I tried assigning 3 cores and KC worked fine then. However the VM CPU usage was at 90%+ and the host's CPU usage was at 80%+ at all times. I don't quite understand why it uses so much CPU when I launch KC on the VM.... Then again, I'm not that savvy about these things.

stackhanovets commented 5 years ago

@Danielosama Did you enable Intel virtualization and disable energy saving features in host BIOS?

Danielosama commented 5 years ago

@stackhanovets I enabled Intel virtualization back when I was setting up the VM for the first time. To be clear, the VM runs perfectly doing everything EXCEPT when I launch KC, at that point the CPU usage skyrockets and the game is laggy as hell. About the energy saving features, no idea tbh.

stackhanovets commented 5 years ago

@Danielosama Can you provide the disk model where VM files are stored in?

Danielosama commented 5 years ago

@stackhanovets Sure, it's a WD black 2TB (Model wdc wd2003fzex-00srla0).

stackhanovets commented 5 years ago

@Danielosama 64 Mb HDD cache looks like a bottleneck for fast I/O processes. You know, insufficient RAM + insufficient paging abilities = CPU overload. Just try 120Gb+ non-system SSD via SATA interface, I did not experience much fun with USB3.0 due to the controller overheat.

mrmin123 commented 5 years ago

Not on a VM, but the laptop I've been running KC + kcauto on has been struggling ever since the HTML5 update. It might be due to poor HTML5 optimization from the dev's end and/or the nature of HTML5 rendering (and Chrome), but running the game (no kcauto) eats up ~80% of my RAM and ~90% of my CPU.

The larger screen real estate kcauto needs to search due to the higher game resolution confounds the issue: the average time for image matching on-screen has gone from ~330ms to anywhere from 530 to 630ms. This is an issue with the Live Combat Engine and its ability to detect the fleet's node properly, even on an old but dedicated machine. If there are ways to optimize the game/brower's performance, it might become a requirement to tune the machine properly going forward.

Danielosama commented 5 years ago

@stackhanovets Unfortunately I don't have a non-system SSD, I only have a 250Gb SSD that I'm using for Windows and some games. But I might have to buy another just for this I guess.

@mrmin123 I just hope the game gets optimized later on x( Is there any way to reduce the CPU/RAM usage on our end? I've tried Opera and the POI Viewer, but it always results in the same usage.... I miss using KCV now :x

stackhanovets commented 5 years ago

@mrmin123 Of course HTML5 is too young. The V8 engine is still under development, so for some JS-related tasks SpiderMonkey is slightly faster. Did somebody already test Firefox with kcauto?

Danielosama commented 5 years ago

Well, my problem is solved now. Playing on Edge solved everything, barely uses 20% CPU and KC Auto runs perfectly. If they ever update KCV, I sure hope they use Edge.

stackhanovets commented 5 years ago

@Danielosama did you drop VM?

Danielosama commented 5 years ago

@stackhanovets Oh no no, all of that is on my VM with only 2 CPU cores and 2Gb of RAM. Runs the game and KCAuto smoothly.