Jump to content

Could high RAM latency be the cause of slower compilation?

Hi, 

 

I have recently bought a Lenovo Ideapad S340-15API (Ryzen 5 3500u model). Everything seems to be fine with the laptop except for one thing. 

 

After installing Visual Studio 2019 I ran a few tests to see if the code executes as smoothly as expected on a new laptop. To my disappointment, the IDE takes about 3-5 seconds to build and run a program as simple as "Hello World", much slower than my 10 years old desktop does it. 

 

So then I ran Passmark Benchmark on it and every component did fine except for RAM. Turns out my memory latency is 192ns, which falls in the 1st percentile :(.

 

I learned that high memory latency is a frequent issue on AMD systems, but I didn't expect it to be THAT bad. Currently my laptop has two DDR4 2666 MHz memory sticks installed, one 4gb soldered on-board and the other 8gb Kingston I added. 

 

My question is - could slow compilation occur in Visual Studio due to high memory latency? If so, how can I mitigate the effect? 

 

EDIT: Btw I tried disabling the anti-virus to fix the slow compilation but it didn't seem to change anything 

Edited by sanduvieru
Link to comment
Share on other sites

Link to post
Share on other sites

Make sure you're actually running dual channel cause with that config it could have defaulted to single channel. 

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, 5x5 said:

Make sure you're actually running dual channel cause with that config it could have defaulted to single channel. 

Just checked CPU-Z, it's running dual channel. 

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, sanduvieru said:

Just checked CPU-Z, it's running dual channel. 

Check for power throttling or heat limiters - cheap laptops usually suffer from power and thermal throttling

Link to comment
Share on other sites

Link to post
Share on other sites

21 minutes ago, 5x5 said:

Check for power throttling or heat limiters - cheap laptops usually suffer from power and thermal throttling

My CPU was running on max frequency when benchmarking for a span of several minutes without lowering the GHz so it doesn't seem to be the problem. 

 

Besides, building and running a 10-line program shouldn't put such a load on the CPU insofar as to cause throttling or overheating. 

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, sanduvieru said:

My CPU was running on max frequency when benchmarking for a span of several minutes without lowering the GHz so it doesn't seem to be the problem. 

 

Besides, building and running a 10-line program shouldn't put such a load on the CPU insofar as to cause throttling or overheating. 

there is something weird happening on the software side. 10 lines of code shouldn't be affected by memory latency.

Link to comment
Share on other sites

Link to post
Share on other sites

21 hours ago, 5x5 said:

there is something weird happening on the software side. 10 lines of code shouldn't be affected by memory latency.

Accidentally checked the memory tab on CPUZ. It says my DRAM frequency is 400 MHz, while it should be 1333 MHz as far as I'm aware (I currently have 2666 MHz RAM installed). I tried changing it in the UEFI/BIOS but it doesn't have memory related options whatsoever.
 

CPUZ.JPG

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, sanduvieru said:

Accidentally checked the memory tab on CPUZ. It says my DRAM frequency is 400 MHz, while it should be 1333 MHz as far as I'm aware (I currently have 2666 MHz RAM installed). I tried changing it in the UEFI/BIOS but it doesn't have memory related options whatsoever.
 

CPUZ.JPG

What happens when you take out your memory sticks? 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, 5x5 said:

What happens when you take out your memory sticks? 

Only one is removable and the numbers don't change at all. 

 

I noticed that when I plug it in the value jumps to 933 MHz and the system itself along with all applications (unsurprisingly) feel much smoother. When I pull the power cord out, though, the DRAM resets back to 400 MHz. 

 

It seems this is some kind of weird power management solution from Lenovo. I tried contacting their support agents from US and UK about this but they don't seem to know what can I do.

 

Are there any ways I can change my memory frequency besides doing it from BIOS(since the laptop UEFI doesn't provide any memory options)? 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, sanduvieru said:

Only one is removable and the numbers don't change at all. 

 

I noticed that when I plug it in the value jumps to 933 MHz and the system itself along with all applications (unsurprisingly) feel much smoother. When I pull the power cord out, though, the DRAM resets back to 400 MHz. 

 

It seems this is some kind of weird power management solution from Lenovo. I tried contacting their support agents from US and UK about this but they don't seem to know what can I do.

 

Are there any ways I can change my memory frequency besides doing it from BIOS(since the laptop UEFI doesn't provide any memory options)? 

 

 

No, laptops don't allow. Memory tweaking unless you have a custom modded Bios or an unlock tool from the manufacturer. 

 

Also, everything is throttled to very low clockspeeds on battery. Its because the battery is niterally not capable of powering everything even for short bursts as it can't deliver as much power as the adapter. If it did, it would explode likely. 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, 5x5 said:

No, laptops don't allow. Memory tweaking unless you have a custom modded Bios or an unlock tool from the manufacturer. 

 

Also, everything is throttled to very low clockspeeds on battery. Its because the battery is niterally not capable of powering everything even for short bursts as it can't deliver as much power as the adapter. If it did, it would explode likely. 

Laptops on Ryzen 5 2500u seem to run on standard 1200 MHz memory speed based on CPU-Z screenshots I've seen on the internet. 

 

So running at normal frequencies shouldn't be a problem for a notebook. 

 

I thought about trying a factory reset. 

 

EDIT: From what I've read, installing the OS once again from a USB stick will remove all the custom manufacturer tweaks and leave my system as it should be. Does it make sense to try that? 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×