Thread overview | |||||
---|---|---|---|---|---|
|
January 29, 2015 cpu % usage decreases when (unrelated) memory usage increases | ||||
---|---|---|---|---|
| ||||
Dear reader, I have a class X that has a (possibly) heavy array of data S as a member. A method f of X makes use of a foreach loop over taskPool(some_other_array Y). The thing is that when I increase the length of S, linux/top shows me that my D program only uses 10% of my cpu capacity. This percentage varies with the length of S. From my perspective, S has nothing to do with X.f. Can someone please explain what might be the issue here? regards, Chris |
January 29, 2015 Re: cpu % usage decreases when (unrelated) memory usage increases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Christiaan | Can you post any of the code itself? My guess would be that something is being cached by the processor - is the code itself faster or slower when the cpu changes? |
January 29, 2015 Re: cpu % usage decreases when (unrelated) memory usage increases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Christiaan | On 01/29/2015 12:33 PM, Christiaan wrote: > Can someone please explain what might be the issue here? If the memory is too large, needing to be swapped to and from disk, then your program may be waiting for I/O instead of doing actual work. Ali |
Copyright © 1999-2021 by the D Language Foundation