Return to Level1Techs.com

What Ryzen CPU should I buy for Node.js Babel V8 Javascript?

Why I want to optimize for code-compilation
I want to upgrade my very old hardware and while I occasionally use many cores for VM’s and compilation etc. My main activity that makes me money is web-app development, so I want to optimize for reducing development-mode compile times.

I typically work on Meteor Node.JS web applications.
Every time I save while working on the project, babel recompiles and rebundles my code which takes a few seconds, then it pushes the new version to the browser which has to re-load and re-render the web-app (which also takes a few seconds). Sometimes I save hundreds of times a day so reducing this delay would be very nice.

This is what my CPU usage looks like in KSysGuard with the update interval set to 0.01 seconds when I do a git-checkout and the Meteor dev server has to re-compile some stuff. You can see it’s currently a lightly threaded workload.

Old CPU’s that I’ve benchmarked
I’ve not benchmarked for a while, but last time I did. Going from my
i7-2640M (2c4t) (2.7GHz, 4MB L3, 1333MHz FSB) (32nm Q4 2011)
to
i5-4670K (4c4t) (4.2GHz, 6MB L3, 1600MHz FSB) (22nm Q2 2013)
Reduced dev-mode compile times from 4~6 seconds down to 2~4 seconds.

My Linux Distro
I do everything in Debian, Linux, but I’m interested in trying ClearOS or compiling my kernel to optimize for my own hardware if it’s not too much hassle (I’ve compiled kernels before, but I’m referring to the hassle of automagically upgrading the kernel vs me having to spend time on it manually every time there’s an update)

Which Ryzen for Javascript compilation and web-dev?
I’ve seen Steve from Gamers Nexus, and Wendell say that the Ryzen 3600 is amazing for compiling code, so I’m wondering what CPU to get. I’ve not been able to find much Javascript benchmarks on various Ryzen CPU’s vs Intel CPU’s.

AMD, not Intel
Whatever CPU I buy, it’s definitely going to be Ryzen. Even if the Ryzen is 5-10% slower than the fastest Intel for single threaded applications, I’d rather buy AMD due to Intel’s eroding performance due to ongoing security flaws and AMD’s multi-threaded advantage yielding better performance as software becomes more multi-threaded.

3600 vs 3800X worthwhile?
So basically I’m wondering if I should get 3600 or if it’s worth getting 3800X (I hear a lot of people recommend 3800X for gaming, which suggests a single threaded advantage for the 3800X over the 3600)

Will Ryzen 4000 series mobile APU’s be good for this?
And I’m also wondering if AMD’s 4000 series mobile CPU’s would be good enough for me. Because over the years I’ve found laptops to be too slow for my liking, but with AMD’s new 4000 series I don’t think that will be a problem for me anymore. As long as the laptop has decent IO (ability to run 2 or 3 external monitors) then I’d prefer a laptop over a desktop for mobility. It is vaguely possible that I’d be interested in building an ultra-portable mini-itx build. But I doubt the extra (bursty) single threaded performance will be much better than a Ryzen 4000 series laptop to justify the loss of mobility.

What about the ultra-thin/portable 4000 series parts?

Here is a profile’d breakdown of a dev-mode compile

| (#1) Profiling: Server startup
| 
| Server startup................................................1,252 ms (1)
| └─ Load server bundles........................................1,233 ms (1)
|    ├─ packages/npm-mongo.js......................................62 ms (1)
|    │  └─ Npm.require("mongodb")                                  62 ms (1)
|    ├─ packages/modules.js........................................28 ms (1)
|    │  └─ require("/node_modules/meteor/modules/server.js").......27 ms (1)
|    │     └─ require("./reify.js")................................26 ms (1)
|    │        └─ require("reify/lib/runtime")                      26 ms (1)
|    ├─ packages/fetch.js..........................................51 ms (1)
|    │  └─ require("/node_modules/meteor/fetch/server.js").........51 ms (1)
|    │     └─ require("node-fetch")                                51 ms (1)
|    ├─ packages/boilerplate-generator.js..........................29 ms (1)
|    │  └─ require("/node_modules/meteor/boilerplate-generator/generator.js").28 ms (1)
|    │     └─ require("/node_modules/meteor/boilerplate-generator/node_modules/combined-stream2/index.js") 27 ms (1)
|    ├─ packages/webapp.js.........................................98 ms (1)
|    │  └─ require("/node_modules/meteor/webapp/webapp_server.js") 98 ms (1)
|    ├─ packages/ddp-server.js.....................................24 ms (1)
|    │  └─ require("/node_modules/meteor/ddp-server/server_convenience.js").23 ms (1)
|    │     └─ Npm.require("sockjs")                                21 ms (1)
|    ├─ packages/shell-server.js...................................24 ms (1)
|    │  └─ require("/node_modules/meteor/shell-server/main.js")    24 ms (1)
|    ├─ packages/server-render.js..................................45 ms (1)
|    │  └─ require("/node_modules/meteor/server-render/server.js").45 ms (1)
|    │     └─ require("/node_modules/meteor/server-render/server-register.js").40 ms (1)
|    │        └─ require("/node_modules/meteor/server-render/node_modules/parse5/lib/index.js") 21 ms (1)
|    ├─ packages/http.js..........................................118 ms (1)
|    │  └─ require("/node_modules/meteor/http/httpcall_server.js").118 ms (1)
|    │     └─ require("request")                                  117 ms (1)
|    ├─ app/app.js................................................669 ms (1)
|    │  ├─ require("/lib/foo000.js")                                 143 ms (1)
|    │  ├─ require("/server/foo00.js")........................81 ms (1)
|    │  │  └─ require("mongodb")                                   76 ms (1)
|    │  └─ require("/server/foo0.js").............................441 ms (1)
|    │     └─ require("/imports/startup/server/foo1.js").........429 ms (1)
|    │        └─ require("/imports/startup/server/blah.js")...429 ms (1)
|    │           ├─ require("/node_modules/react/index.js")        36 ms (1)
|    │           ├─ require("/node_modules/react-dom/server.js")   63 ms (1)
|    │           ├─ require("/node_modules/react-router-dom/index.js") 32 ms (1)
|    │           └─ require("/imports/startup/server/blah.js").294 ms (1)
|    │              └─ require("/imports/startup/foo/bar.js").293 ms (1)
|    │                 └─ require("/imports/foo2.jsx").257 ms (1)
|    │                    └─ require("/node_modules/react-dom/index.js") 251 ms (1)
|    └─ other Load server bundles                                  42 ms
| 
| Top leaves:
| require("/node_modules/react-dom/index.js")................251 ms (25)
| require("request").........................................117 ms (1)
| 
| (#1) Total: 1,252 ms (Server startup)
| 
=> Meteor server restarted
=> Finished delayed build of web.browser.legacy in 288ms

I don’t have a Ryzen setup yet but I would push the 3800X for future proofing so to speak. It will be able to handle the VMs and compiling more so than the 3600.

In regards to the Mobile 4000 parts, just understand that the Mobile parts are the previous architecture’s parts optimized for mobile. So the Mobile 2000U parts were 1000 desktop parts. 4000 mobile will be 3000 desktop parts. I don’t know why marketing went with that scheme but it can be a little misleading to those who do not know.

Thanks, that’s pretty interesting about 4000 mobile using 3000 series architecture. Very good to know, but I don’t necessarily need the latest Ryzen architecture. From the few compiling benchmarks I’ve seen, 3000 series is pretty fantastic as is.
Knowing what you’ve just told me adds some points for an ITX build.

FYI I’ve posted on the Meteor forum to see if anyone has compared Ryzen there.
forums.meteor.
com/t/meteor-development-on-amd-ryzen-2000-and-3000-series-cpus/51856

Well… the CPUs you tested are actually pretty good IMO

If you really really really want to upgrade I’d say go for Ryzen 3000, either 3600 or above.

But how’s the rest of your system? The i5 4670k is beefy AF, do you know if Meteor is multi-threaded? If it isn’t then your gain would be minimal at best. With 16 to 32 gigs of ram and a good SSD you’d be set for a while…

You mean Gentoo? If you mean Gentoo then it’s a hell of a hassle, believe me, it’s doable but the beginning is tough.

If you can go for the 3800X you should go for it, I don’t think it’d be a loss anyways

Only if you use Windows with it, it will take a while for new ryzen laptops to become a good thing in linux.