AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-764678

Chris's questions

Martin Hope
Chris
Asked: 2020-01-18 14:16:39 +0800 CST

自己的 Python 应用程序 + 其他应用程序使系统冻结 - 从哪里开始搜索问题?

  • 1

我用 Python 编写了一个长时间运行(数小时/天)的应用程序,它在一个内核上占用 100% CPU 和大约 1GB 的 RAM - 正如预期的那样。(根据 htop 在 1 左右加载)

通常,在这些运行期间,我不会经常使用Kubuntu 19.04HP 笔记本电脑 ( )。i5 7200, 2.5GHz, 8GB RAM, SSD

有时,我需要使用它并注意到负载高达 20、30 甚至更高。系统变得非常无响应 - 通常鼠标移动缓慢但我无法单击任何内容。有时,负载下降,我可以关闭其他软件。有时我需要在等待 10 - 30 分钟的高负载/无响应的系统/尖叫的 CPU 风扇后关闭笔记本电脑。

我的印象是,我的程序 + Atom 和/或我的程序 + Chromium 的组合导致了高负载。

根据谷歌的说法,慢速鼠标似乎是一个问题——主要与游戏/图形适配器/驱动程序等有关。我的情况似乎没有包含在结果中。

我应该从哪里开始挖掘?

我看到这个:

Jan 18 05:19:37 hpn-HP-Notebook systemd-udevd[468]: 0003:275D:0BA6.0022: Worker [7254] 处理 SEQNUM=18942 需要很长时间

在/var/log/syslog几次。我在笔记本电脑上运行 mongodb 和 Apache(都只是开发环境 - 没有 http 流量左右,我在我的程序中保持 mongodb 请求非常低并且只使用批量写入)

一切顺利时的以下详细信息(Python + Chromium + Atom + LibreOffice Calc)

free -h (before starting Python program, with Chromium and Atom running)
              total        used        free      shared  buff/cache   available
Mem:          7.7Gi       4.4Gi       213Mi       590Mi       3.1Gi       2.5Gi
Swap:         2.0Gi        12Mi       2.0Gi

free -h (after starting Python program, with Chromium and Atom running)
              total        used        free      shared  buff/cache   available
Mem:          7.7Gi       5.6Gi       729Mi       645Mi       1.4Gi       1.2Gi
Swap:         2.0Gi       148Mi       1.9Gi

sudo lshw -C memory
  *-firmware                
       description: BIOS
       vendor: Insyde
       physical id: 0
       version: F.21
       date: 10/27/2016
       size: 128KiB
       capacity: 6080KiB
       capabilities: pci upgrade shadowing cdboot bootselect edd int13floppynec int13floppytoshiba int13floppy360 int13floppy1200 int13floppy720 int13floppy2880 int9keyboard int10video acpi usb biosbootspecification uefi
  *-cache:0
       description: L1 cache
       physical id: 5
       slot: L1 Cache
       size: 128KiB
       capacity: 128KiB
       capabilities: synchronous internal write-back unified
       configuration: level=1
  *-cache:1
       description: L2 cache
       physical id: 6
       slot: L2 Cache
       size: 512KiB
       capacity: 512KiB
       capabilities: synchronous internal write-back unified
       configuration: level=2
  *-cache:2
       description: L3 cache
       physical id: 7
       slot: L3 Cache
       size: 3MiB
       capacity: 3MiB
       capabilities: synchronous internal write-back unified
       configuration: level=3
  *-memory
       description: System Memory
       physical id: 26
       slot: System board or motherboard
       size: 8GiB
     *-bank:0
          description: SODIMM DDR Synchronous [empty]
          physical id: 0
          slot: Bottom-slot 1(left)
     *-bank:1
          description: SODIMM DDR4 Synchronous 2133 MHz (0.5 ns)
          product: M471A1K43CB1-CRC
          vendor: Samsung
          physical id: 1
          serial: 3491FD06
          slot: Bottom-slot 2(right)
          size: 8GiB
          width: 64 bits
          clock: 2133MHz (0.5ns)
  *-memory UNCLAIMED
       description: Memory controller
       product: Sunrise Point-LP PMC
       vendor: Intel Corporation
       physical id: 1f.2
       bus info: pci@0000:00:1f.2
       version: 21
       width: 32 bits
       clock: 33MHz (30.3ns)
       capabilities: bus_master
       configuration: latency=0
       resources: memory:c142c000-c142ffff

编辑:HP 笔记本电脑 - 15-ay143tx

python kubuntu cpu-load hp 19.04
  • 1 个回答
  • 105 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve