Forums › English Language Forums › Technical › Technical Issues

Search

problems with dual core computer and game

5 replies [Last post]
Fri, 09/16/2011 - 15:49
Cloud_firaga
Legacy Username

Ok well I'm not much of a tech, I'm more of a hardware guy. Just so you know you'll have to be a little slow with me. lol

ok so I have a laptop

HP Pavilion Entertainment PC Version DV4T-1400
Pentium Dual Core CPU T4200 2.20 GHz x2
64-bit win7
4G Ram and 18G VRam/Pagefile on 2 HDD one external with 3GHz+ transfer rate

Did all that to make better performance on this POS laptop
Ok now that that is out of the way

Here's the problem I can set the game for dual CPU Usage, default is the second processor CPU1 and it uses all of it. when it uses both the CPU usage is 50/50 instead of 0/100

I want it to use more because the game lags a bit with spawn loads and explosions and other things. I have a good internet connection so I absolutely know that's not it. I have also messed with the CPU priority, and have it set to high right now because it helps a bit and the only drawback if I go to realtime is the sounds get really choppy (but it still won't use more CPU I'm 99% sure it needs it)
I'm also sure it's not outside interference with anything else on the computer I've gone as far as killing all tasks and turning off everything not necessary for the game to run, this also includes launching the game then killing explorer.exe the windows GUI

Also I want to play spiral knights on Java7se from Oracle (so I can tell it to use more CPU) but I can't figure that out. I use my steam account for my main character and I've read a bunch on the forums but it's all gibberish to me right now if someone could give me a step by step play through on what I can do to get that fixed it would be awesome.

Sat, 09/17/2011 - 18:27
#1
Starlinvf's picture
Starlinvf
The pauses during load ups

The pauses during load ups due to memory limitations imposed on startup. When starting, java allocates a certain amount of memory to cover the run time environment, code stack and lastly the Heap. The heap acts as memory space for data used by the program. The Stack keeps the running code, but tends to be static once loaded.

The underlying problem for the pausing is the sudden appearance of multiple props completely fills up the heap. When that happens, java forces it to pause the thread, clean up the heap to make room, finish loading data, then resuming the thread. You can mitigate this slightly by doubling the heap from 256 to 512 by adding -Xmx512m switch and manipulating the shortcuts. Theres a few threads on how to do this properly depending on your setup.

As for CPU usage, the game isn't coded to support multi-threading (ie will only run on 1 core), and JRE won't do it natively if the java code can't. As for CPU priorities, its not a good idea to set them manually unless you have a very specific reason to do so. Process priorities are applied against the entire system, including OS components. When you set it to real-time, you managed to overtake several system critical processes, including the sound manager. If left running like that long enough, it will eventually make the system unstable and crash.

Mon, 09/19/2011 - 11:14
#2
Cloud_firaga
Legacy Username
Ok that is good to know

Ok that is good to know (kinda already did that too) but what is the maximum heap size I can set, i'm going to try setting it for 3 gigs worth, so... 3096m, right or can I just put 3g [well I'm testing it anyways lol]? Like I said before I have plenty of ram and Vram for the game to use.

well the processor affinity doesn't mak sense to me then because if what you say is tru it should still only use one of the processors if I set that but it uses both and only at 50% each

On the CPU priorities I thank you for the insight of what realtime actually does. I never knew ever since I was using windows 3.1 lol (yes I had an Ancient computer when I was a 7 year old)

Also the only thing I had running on the computer is the game half the time I closed everything else including explorer just to make more resources for the game, guess I don't need to try that anymore, but i'm not sure the system would crash seeing as the computer had a whole other processor that it was told not to use on the game.

But thank you for your help ^_^

Tue, 09/20/2011 - 03:08
#3
Starlinvf's picture
Starlinvf
You can set it to anything

You can set it to anything you want, just remember that the higher you set it, the more RAM its going to consume, and is more likely to push something into the page file and degrade overall performance. The game itself doesn't require a lot of resources, but the way memory management works in java causes it to fill faster then it cleans up. Setting it higher doesn't completely get rid of it, but spaces out the pauses a lot further apart. 512m should work well enough, but I wouldn't bother going past 1g since it lengthens the time needed for clean up operations when it does need it.

As for proc affinity, you can't completely trust task manager since its not giving the full picture. But check the process tab to see if its using 50% or 99% of CPU time, and what else is actively running. I haven't thought about it in a long time, and never got too in-depth, but IIRC single threaded processes will get bounced around all the cores due to the way the thread scheduler in the OS looks at things. Its not parallel processing since its only running one piece of the thread at a time, but is effectively taking turns on each core in a round robin fashion. (Thats where I messed in up in my other statement)

You can identify this behavior by looking at the CPU usage in the process tab and performance graph. If the workload looks to be spread evenly across all cores detected cores, and the CPU usage for the process is 100/X where X=number of cores, then its single threaded app. Multi-threaded processes should be able to break that cap, and may even run an asymmetrical CPU load if its using worker threads to do different types of tasks.

Mon, 01/09/2012 - 12:39
#4
Ushio-Shinoda's picture
Ushio-Shinoda
Assistance

Well, here's a few things you can do to help out with this issue as I have a computer twice as good as yours yet I used to lag the same =/. You need to put the resolution to the lowest setting, change the graphics level to low, then go into the advanced options, turn off vertical sync, then turn on compatibility mode. It fixed alot, takes a little longer to load the dungeon levels, but overall I never really lag unless I'm clicking on my character button, etc. But unless you've got a T4 Internet Connection, I think It'll still lag in one way or another. But at least now I can actually play.

Mon, 01/09/2012 - 15:07
#5
Juances's picture
Juances
d'oh

september 2011 - january 2012
better late than never?

Since you also seem to do way too much to play, i recommend you to search the performance guide with java tweaks if you're interested :p

Powered by Drupal, an open source content management system