High cpu usage by ruby interpreter after install - ruby

I've installed Ruby and the vscode extension so I can build a liquid theme for shopify.
The cpu usage is high when idle ~30%. After closing vscode the interpreter stays in memory and continues to use the same 30% cpu.
Is this normal? Does Ruby do some prep tasks in the background which will eventually complete and cpu will go to ~0 when idle and shutdown when I close vscode?
Or is the cpu usage always that high? I've looked around, this mac issue hints at it being the case without additional configuration and another says recompilation of Ruby solved their high cpu issue.
I'm running on Win 10
Cheers

Related

Is there a min amount of ram to run create react app?

I find when I run create react app on my laptop then begin to code in VSCODE my laptop heats up a lot more than usual to the point its burning to the touch.
I have a macbook pro 2018 macos mojave fully upto date i5 8gb ram.
Is the reason for this low ram of 8gb?
Any information would be amazing.
Thanks
Nav
Not sure what to try?
npx create-react-app
Not expecting laptop to get unusually hot. Only happens when running create react app. also sometimes happens when running Atom IDE but does anyone even use that anymore?
No, the amount of ram you have should be more than sufficient to to VSCode and a create-react-app. Ram also has little impact on heat so I don't think that is causing the issue.
What you could try is to open the activity monitor to check if any processes are using more CPU than they should. Also check under the Energy-tab, that could give you a good guidance to what is causing your heating problem. As an example, I've had problems before where some of my VSCode plugins have had a bug that causes them to run at 100% CPU constantly.

CPU threads state in OSX Terminal [duplicate]

I've been looking for a osx utility that shows cpu usage for each cpu. For example
CPU 0 - 10%
CPU 1 - 2%
...
I know of many ways of getting this information in other Unix-like system (/proc, mpstat, etc) but none work in osx. The most useful one for Mac is top but it only shows total cpu usage. I need the application to be run from the shell so that I can log the usage over time. I also tried cpuwalk.d but it only shows you if the application is running in one or more cores.
If you take a look at Activity Monitor app you will notice that it basically displays the same info as top, but with the addition of a graph that shows cpus load.
If anyone has any idea of how to get the information I would appreciate it. Thanks.
You can try htop. If you have homebrew installed, simple install it via "brew install htop", after the installation finished, type in htop on the shell.
you can download os x hardware monitor src from: https://github.com/max-horvath/htop-osx

socketfilterfw process eats 130-160% CPU while Xcode running, macbook is ready to fly

In the latest Xcode I systematically get dramatic slow-down by socketfilterfw process.
It takes my MacBook almost to fly with over than 100% CPU usage.
It can be stopped only by killing this process.
What is wrong with Xcode?
It seems that the problem was in Brandmauer (Firewall Settings)!
My Xcode was blocked for incoming connections. Now after "allow" choice I almost have no that problem with socketfilterfw process eating CPU.

Is Windows task manager showing memory usage inaccurately?

I am writing a huffman coding and decoding in python and when I run it, windows task manager goes to 100% and jumps up to 5GB of RAM usage under my python project. I installed Memory_profiler for python, to see what is going on and there was not much going on. Windows jumps to those high values in places where profiler showed me 7MB or 180MB increments. What should I trust? My laptop does get laggy a lot when I get to those values.

Emulating a processor's (limited) resources, including clock speed

I would like a software environment in which I can test the speed of my software on hardware with specific resources. For example, how fast does this program run on an 800MHz x86 with 24 Mb of RAM, when my host hardware is a 3GHz quad core amd64 with 12GB of RAM? Emulators such as qemu make a great point of running "almost as fast" as the underlying hardware; I would like to make it run slower. Is there a way to do that?
I have never tried it, but perhaps you could achieve what you want to some extent by combining an emulator like QEMU or VirtualBox on Linux with something like this:
http://cpulimit.sourceforge.net/
If you can limit the CPU time available to the emulator you might be able to simulate the results of execution on a slower computer. Keep in mind, though, that this would only affect the execution speed (or so I hope, anyway).
The CPU instruction set and other system features would remain unchanged. This means that emulating a specific processor accurately would be difficult if not impossible.
In addition, using something like cpulimit, which works using SIGSTOP and SIGCONT to repeatedly stop/restart the emulator process might cause side-effects, such as timing inconsistencies, video display artifacts etc.
In your emulator, keep a virtual "clock" and increment it appropriately as you execute each instruction. From there you can simply report how long it took in virtual time to execute, or you can have your emulator sleep now and again to keep execution speed roughly where it would be in the target.

Resources