Two processes doing extensive calculations – I want one to get ~100% of processor time – how?

I am running Ubuntu basic server with two processes: – process 1 – performing calculation 100% of uptime, and which I use to share computing power to community (it’s running @ prio 19) – process 2 – performing calculations for 5-10mins, from time to time, which I use to compute for me (it’s running @prio -19)

I want process 2 to be given with 100% of computing power (process 1 is at that moment should get close to 0% of CPU). But best what I get is 50% of CPU for process 1 and 50% of CPU for process 2 (checked with htop).

I don’t want to manually stop/start any process when I need computing power (both processes must be running all the time); 100% of CPU for process 2 must be given automatically.

What should I do to achieve my goal? Thanks.

External drive causes all processes talking to it to freeze. Has the drive failed?

My external drive cannot be accessed. It seems that the auto-mount hangs. When I click “Mount”, I get “unable to access volume – an operation is already pending.” When I try to remove the drive, I get: “Unable to Stop WCD – Error opening /dev/sdb for fsync: Device or resource busy.”

fdisk -l /dev/sdb hangs.

dmesg contains the following recent warnings:

task scsi_eh_6:5019 blocked for more than 120 seconds ... task fdisk blocked for more than 120 seconds ... task mount:5301 blocked for more than 120 seconds ... task pool-udisksd:5059 blocked for more than 120 seconds 

Etc. Every time I try to access the drive, the process trying to access it hangs and can’t access it. I tried to run badblocks, and even it froze after twenty minutes – badblocks blocked for more than 120 seconds, etc.

I am not sure what kind of hardware problem causes every process trying to talk to the disk (including all diagnostic tools) to freeze. None of them can be terminated by Ctrl-C, I have to exit the terminal. What should I do?

Update:

=== START OF INFORMATION SECTION === Model Family:     Western Digital Blue Device Model:     WDC WD10EZEX-08WN4A0 Serial Number:    WD-WCC6Y0KC7LX4 LU WWN Device Id: 5 0014ee 20e20948d Firmware Version: 01.01A01 User Capacity:    1,000,204,886,016 bytes [1.00 TB] Sector Sizes:     512 bytes logical, 4096 bytes physical Rotation Rate:    7200 rpm Form Factor:      3.5 inches Device is:        In smartctl database [for details use: -P show] ATA Version is:   ACS-3 T13/2161-D revision 3b SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 3.0 Gb/s) Local Time is:    Thu Sep 26 17:46:58 2019 CDT SMART support is: Available - device has SMART capability. SMART support is: Enabled  === START OF READ SMART DATA SECTION === SMART Status command failed: Connection timed out SMART overall-health self-assessment test result: PASSED Warning: This result is based on an Attribute check.  General SMART Values: Offline data collection status:  (0x82) Offline data collection activity                     was completed without error.                     Auto Offline Data Collection: Enabled. Self-test execution status:      (   0) The previous self-test routine completed                     without error or no self-test has ever                      been run. Total time to complete Offline  data collection:        (12000) seconds. Offline data collection capabilities:            (0x7b) SMART execute Offline immediate.                     Auto Offline data collection on/off support.                     Suspend Offline collection upon new                     command.                     Offline surface scan supported.                     Self-test supported.                     Conveyance Self-test supported.                     Selective Self-test supported. SMART capabilities:            (0x0003) Saves SMART data before entering                     power-saving mode.                     Supports SMART auto save timer. Error logging capability:        (0x01) Error logging supported.                     General Purpose Logging supported. Short self-test routine  recommended polling time:    (   2) minutes. Extended self-test routine recommended polling time:    ( 124) minutes. Conveyance self-test routine recommended polling time:    (   5) minutes. SCT capabilities:          (0x3035) SCT Status supported.                     SCT Feature Control supported.                     SCT Data Table supported.  SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE   1 Raw_Read_Error_Rate     0x002f   199   198   051    Pre-fail  Always       -       67   3 Spin_Up_Time            0x0027   174   173   021    Pre-fail  Always       -       2283   4 Start_Stop_Count        0x0032   092   092   000    Old_age   Always       -       8792   5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0   7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0   9 Power_On_Hours          0x0032   078   078   000    Old_age   Always       -       16789  10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0  11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0  12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       21 192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       9 193 Load_Cycle_Count        0x0032   197   197   000    Old_age   Always       -       9697 194 Temperature_Celsius     0x0022   115   102   000    Old_age   Always       -       28 196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0 197 Current_Pending_Sector  0x0032   199   199   000    Old_age   Always       -       166 198 Offline_Uncorrectable   0x0030   200   199   000    Old_age   Offline      -       76 199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0 200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       83  SMART Error Log Version: 1 No Errors Logged  SMART Self-test log structure revision number 1 No self-tests have been logged.  [To run self-tests, use: smartctl -t]  SMART Selective self-test log data structure revision number 1  SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS     1        0        0  Not_testing     2        0        0  Not_testing     3        0        0  Not_testing     4        0        0  Not_testing     5        0        0  Not_testing Selective self-test flags (0x0):   After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay.  Command "Execute SMART Short self-test routine immediately in off-line mode" failed: Connection timed out 

The gnome-disks utility says that the Ext4 filesystem on the disk is undamaged, and the smartctl tests just return “connection timed out.” So what’s up?

“Module nvidia is in use” but there are no processes running on the GPU

I am trying to configure VirtualGL, and the configuration gives the following message:

IMPORTANT NOTE: Your system uses modprobe.d to set device permissions. You must execute rmmod nvidia with the display manager stopped in order for the new device permission settings to become effective. 

When I try running rmmod nvidia (or with sudo), it says that module nvidia is in use:

rmmod: ERROR: Module nvidia is in use by: nvidia_uvm nvidia_modeset

I have already stopped my window manager by running sudo systemctl stop sddm.service, so when I check nvidia-smi it says that there are no processes running on the GPU.

Most of the threads I found on this issue are related to bumblebee, but I don’t even have it insalled.

Output of nvidia-smi:

+-----------------------------------------------------------------------------+ | NVIDIA-SMI 430.40       Driver Version: 430.40       CUDA Version: 10.1     | |-------------------------------+----------------------+----------------------+ | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC | | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. | |===============================+======================+======================| |   0  GeForce GTX 1080    Off  | 00000000:01:00.0 Off |                  N/A | | 33%   39C    P8    12W / 200W |      9MiB /  8119MiB |      0%      Default | +-------------------------------+----------------------+----------------------+  +-----------------------------------------------------------------------------+ | Processes:                                                       GPU Memory | |  GPU       PID   Type   Process name                             Usage      | |=============================================================================| |  No running processes found                                                 | +-----------------------------------------------------------------------------+ 

Ubuntu 18.04

How to get PIDs of processes with most network usage in descending order

I’m using my phone’s hotspot for using internet on my laptop with Ubuntu 18.04 installed. But even if I’m not doing anything, my laptop is still using the data and consumed my whole data pack within 20 minutes.

This is happening from last 3 days and I’m looking for a solution. I want to know what exactly is using this much data?

On Windows, network usage is directly visible in Task Manager. So, I guess there is an equivalent way to do the same on Linux.

I tried using ps command but I don’t think it gives details about network usage (Correct me if I’m wrong).

Also, I tried searching on stackoverflow and came across tools like iftop and many others. But I’m not able to find any details about the cause of the issue from any of the tools.

I’m not even able to install those tools mentioned on the articles found on the web/stackoverflow.

So, I want to know if there is any command that will sort the processes according to the network usage and that too without using any tools that need to be installed.

Is there any way to do this?

APT always busy, no processes running for apt though

So recently I wanted to install some programs on my computer, and when I did “sudo apt install [package]” I get

E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it? 

I left my computer on for like 2 hours, came back, and nothing changed. Does anyone know how to fix this???

Weird processes hogging lots of resources on my MacBook

enter image description here

This is an old screenshot but basically these two processes (eriocaulaceae and stahlhelmer) just popped out of nowhere, and I couldn’t find any information online. Just now they were hogging 99% of CPU but it disappeared when I opened stack exchange tab to post this question.

Any help identifying these two processes would be greatly appreciated.

I have mid 2012 MacBook Pro with 10.14.5 Mojaves.

Training Documentation / Company Processes [on hold]

I work in a Saas company with a huge system, and set of processes. We have a wiki, lots of resources on google drive and information / documentation stored in a large number of random places (including some individuals’ own minds).

I am trying to develop a one stop shop knowledge base for our engineers…Initially the ideas was a resource that can be used for training new hires but as we started to discuss it, we realised how badly we need it to be the reference point for all existing employees. I work on a specific engineering team so will create it for our team initially and build out from there.

This is going to be a HUGE task as there is so much to gather together but I am looking for some recommendations to get started, specifically if anybody has good ideas / resources for how we could create this one stop shop and

  • Add system architecture diagrams
  • Include drill-down links to more detail and eventually down to code
  • List / link to tools available to engineers
  • A live area where individuals can add ‘troubleshooting tips’ (for issues they solved in our live environment)
  • Information on how our section of the system integrates with other teams

Or just ideas / recommendations on how these things are managed in companies you’ve worked for.

Ergodicity criterion for multivariate gaussian processes

Let $ [0, +\infty) \ni t \mapsto X(t) \in \mathbb{R}^d$ be a stochastic process over a probability space $ (\Omega, \mathcal{F}, \mathbb{P})$ .

Suppose that $ X$ is strictly stationary and gaussian.

Is there a sufficient condition that guarantees that $ X$ is ergodic?

(Ergodicity in the sense that: $ \frac{1}{T}\int_0^T \varrho(X(t)) dt \to \mathbb{E}[\varrho(X(0))]$ for all bounded measurable $ \varrho$ )

If $ d=1$ there is a famous criterion which considers the decay of the two-point correlation function. Is it clear how to extend this to higher dimensions?

My first idea was to prove that any one-dimensional projection is ergodic (by applying the criterion above). Then the problem is that I do not know how to lift this to the entire process, as there are elementary examples where joint ergodicity does not follow, even under the hypothesis of independent one-dimensional ergodicity. It might be that gaussianity helps in a way I do not see.