LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux poor performance while copying files (https://www.linuxquestions.org/questions/linux-newbie-8/linux-poor-performance-while-copying-files-917676/)

sunnieside-up 12-08-2011 01:02 AM

Linux poor performance while copying files
 
Hi All,

I have used a variety of software configurations for linux: Arch, Fedora, XFCE, KDE. And in all of these systems, I notice that computer performance is slow, and applications respond sluggishly when I am copying large files. Why is this? I do not notice this in Windows. Thanks!

coolsg5636 12-08-2011 01:05 AM

I am not sure if this can be true that Windows is better at performance than Unix/Linux but I guess this is not a debate.

So can you please paste your Hardware Configuration here ?

asimba 12-08-2011 01:08 AM

files are being

1. copied from ? / source (optical drive/USB/Sata/IDE/SCSCI/Network etc)
2. destination ? (optical drive/USB/Sata/IDE/SCSCI/Network etc)
3. What size

Any background processes ... which are eating CPU/Memory ?
Are you doing multiple operations on same device where file is being copied from/to ?

I believe its hard to pin point without details

sunnieside-up 12-08-2011 01:51 AM

Oh I copy from the local hard drive from /dev/sda5 to /dev/sda6. CPU usage is about 15% on 2 cores, I have i5. It's not really a specific copy. This is all copy, while the copy is going. Like in KDE using dolphin. Or thunar in XFCE.

asimba 12-08-2011 02:01 AM

in absence of hard drive contention/memory usage - it will take some time to work it out.

how about pasting ps when you are copying ?

and also "top" screenshot - while some file is being copied - presumably file/copy is large enough to get these stats.

And How about console mode - have tried copying in console mode - do results still stay same.

deep27ak 12-08-2011 06:52 AM

post the output of

Code:

#free -m
(when you are not running any process)
(when you are copying some file)

Code:

#top
(post the output)

Code:

#top
(press shift+m)
post the output


hasanatizaz 12-08-2011 07:00 AM

swap size can be another factor. too big or too less.

sunnieside-up 12-10-2011 01:55 PM

Yep, this affects the cp command as well.

Code:

free -m (not copying)
            total      used      free    shared    buffers    cached
Mem:          3821      2316      1504          0        17      1647
-/+ buffers/cache:        652      3168
Swap:        2426          3      2423

free -m (copying)
            total      used      free    shared    buffers    cached
Mem:          3821      3673        147          0        20      2948
-/+ buffers/cache:        704      3116
Swap:        2426          6      2420

Code:

top
top - 11:53:55 up 18 min,  3 users,  load average: 4.25, 2.17, 1.04
Tasks: 156 total,  1 running, 155 sleeping,  0 stopped,  0 zombie
Cpu(s):  1.5%us,  2.2%sy,  0.0%ni, 52.1%id, 43.2%wa,  0.5%hi,  0.5%si,  0.0%st
Mem:  3912780k total,  3764388k used,  148392k free,    14020k buffers
Swap:  2485244k total,    6816k used,  2478428k free,  3036120k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND             
 1949 kaiwens  20  0  295m 9.8m 8008 D  5.3  0.3  0:04.93 kio_file           
 1055 root      20  0  157m  38m  19m S  2.0  1.0  0:21.18 X                   
 1495 kaiwens  20  0 1168m  91m  33m S  2.0  2.4  0:10.90 plasma-desktop     
 1629 kaiwens  20  0  587m  27m  18m S  2.0  0.7  0:02.59 konsole             
 1479 kaiwens  20  0  847m  97m  43m S  1.7  2.5  0:20.11 kwin               
  34 root      20  0    0    0    0 D  1.0  0.0  0:01.28 kswapd0             
 1945 kaiwens  20  0  608m  28m  19m S  0.7  0.7  0:01.58 dolphin             
  430 root      20  0    0    0    0 D  0.3  0.0  0:01.05 flush-8:0           
 1234 kaiwens  20  0 31404 1920  720 S  0.3  0.0  0:00.82 dbus-daemon         
 1428 root      20  0  150m 3504 2704 S  0.3  0.1  0:00.12 upowerd             
 1499 kaiwens  20  0  373m  12m 9744 S  0.3  0.3  0:00.36 kuiserver           
 1570 kaiwens  20  0  892m  35m  18m S  0.3  0.9  0:01.18 krunner             
 1750 kaiwens  20  0 1150m 119m  26m S  0.3  3.1  0:37.12 firefox             
 1977 kaiwens  20  0 15248 1244  908 R  0.3  0.0  0:00.06 top                 
    1 root      20  0 56072  22m 1660 S  0.0  0.6  0:02.21 systemd             
    2 root      20  0    0    0    0 S  0.0  0.0  0:00.00 kthreadd           
    3 root      20  0    0    0    0 S  0.0  0.0  0:00.02 ksoftirqd/0         
    6 root      RT  0    0    0    0 S  0.0  0.0  0:00.00 migration/0         
    7 root      RT  0    0    0    0 S  0.0  0.0  0:00.00 watchdog/0         
    8 root      RT  0    0    0    0 S  0.0  0.0  0:00.00 migration/1         
  10 root      20  0    0    0    0 S  0.0  0.0  0:00.02 ksoftirqd/1         
  11 root      20  0    0    0    0 S  0.0  0.0  0:00.28 kworker/0:1         
  12 root      RT  0    0    0    0 S  0.0  0.0  0:00.00 watchdog/1         
  13 root      RT  0    0    0    0 S  0.0  0.0  0:00.00 migration/2         
  15 root      20  0    0    0    0 S  0.0  0.0  0:00.00 ksoftirqd/2         
  16 root      RT  0    0    0    0 S  0.0  0.0  0:00.01 watchdog/2         
  17 root      RT  0    0    0    0 S  0.0  0.0  0:00.00 migration/3         
  18 root      20  0    0    0    0 S  0.0  0.0  0:00.01 kworker/3:0         
  19 root      20  0    0    0    0 S  0.0  0.0  0:00.00 ksoftirqd/3         
  20 root      RT  0    0    0    0 S  0.0  0.0  0:00.00 watchdog/3         
  21 root      0 -20    0    0    0 S  0.0  0.0  0:00.00 cpuset             
  22 root      0 -20    0    0    0 S  0.0  0.0  0:00.00 khelper             
  23 root      20  0    0    0    0 S  0.0  0.0  0:00.00 kdevtmpfs           
  24 root      0 -20    0    0    0 S  0.0  0.0  0:00.00 netns               
  25 root      20  0    0    0    0 S  0.0  0.0  0:00.00 sync_supers         
  26 root      20  0    0    0    0 S  0.0  0.0  0:00.00 bdi-default         
  27 root      0 -20    0    0    0 S  0.0  0.0  0:00.00 kintegrityd         
  28 root      0 -20    0    0    0 S  0.0  0.0  0:00.00 kblockd             
  29 root      0 -20    0    0    0 S  0.0  0.0  0:00.00 ata_sff             
  30 root      20  0    0    0    0 S  0.0  0.0  0:00.00 khubd               
  31 root      0 -20    0    0    0 S  0.0  0.0  0:00.00 md                 
  35 root      25  5    0    0    0 S  0.0  0.0  0:00.00 ksmd               
  36 root      39  19    0    0    0 S  0.0  0.0  0:00.05 khugepaged         
  37 root      20  0    0    0    0 S  0.0  0.0  0:00.00 fsnotify_mark       
  38 root      0 -20    0    0    0 S  0.0  0.0  0:00.00 crypto             
  44 root      0 -20    0    0    0 S  0.0  0.0  0:00.00 kthrotld           
  47 root      20  0    0    0    0 S  0.0  0.0  0:00.00 scsi_eh_0           
  48 root      20  0    0    0    0 S  0.0  0.0  0:00.00 scsi_eh_1           
  49 root      20  0    0    0    0 S  0.0  0.0  0:00.00 scsi_eh_2           
  50 root      20  0    0    0    0 S  0.0  0.0  0:00.00 scsi_eh_3

Code:

top with shift m:
top - 11:54:33 up 18 min,  3 users,  load average: 5.42, 2.69, 1.26
Tasks: 155 total,  2 running, 153 sleeping,  0 stopped,  0 zombie
Cpu(s):  1.8%us,  2.6%sy,  0.0%ni, 43.9%id, 51.0%wa,  0.4%hi,  0.4%si,  0.0%st
Mem:  3912780k total,  3767140k used,  145640k free,    13236k buffers
Swap:  2485244k total,    6816k used,  2478428k free,  3035852k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND             
 1750 kaiwens  20  0 1150m 119m  26m S  0.5  3.1  0:38.89 firefox             
 1479 kaiwens  20  0  851m 100m  43m S  5.5  2.6  0:21.41 kwin               
 1495 kaiwens  20  0 1168m  91m  33m S  2.7  2.4  0:11.79 plasma-desktop     
 1417 kaiwens  20  0 1070m  45m  33m S  0.0  1.2  0:01.14 kded4               
 1577 kaiwens  20  0  517m  39m  19m S  0.0  1.0  0:00.60 python             
 1055 root      20  0  157m  38m  19m S  1.6  1.0  0:22.56 X                   
 1435 kaiwens  20  0  626m  36m  30m S  0.0  1.0  0:00.37 ksmserver           
 1570 kaiwens  20  0  892m  35m  18m S  0.0  0.9  0:01.20 krunner             
 1945 kaiwens  20  0  608m  28m  19m S  0.0  0.7  0:01.78 dolphin             
 1491 kaiwens  20  0 1140m  28m  16m S  0.0  0.7  0:00.99 knotify4           
 1629 kaiwens  20  0  587m  27m  18m S  0.5  0.7  0:02.92 konsole             
 1806 kaiwens  20  0  425m  25m  13m S  0.0  0.7  0:03.84 plugin-containe     
 1595 kaiwens  20  0  802m  25m  16m S  0.0  0.7  0:00.43 kmix               
    1 root      20  0 56072  22m 1660 S  0.0  0.6  0:02.21 systemd             
 1580 kaiwens  20  0  461m  16m  12m S  0.0  0.4  0:00.12 polkit-kde-auth     
 1486 kaiwens  20  0  379m  15m  12m S  0.0  0.4  0:00.15 kactivitymanage     
 1509 kaiwens  20  0  408m  15m  12m S  0.0  0.4  0:00.21 kaccess             
 1426 kaiwens  20  0  376m  13m 9992 S  0.0  0.4  0:00.21 kglobalaccel       
 1499 kaiwens  20  0  373m  12m 9744 S  0.0  0.3  0:00.47 kuiserver           
 1948 kaiwens  20  0  368m  11m 9040 S  0.0  0.3  0:00.06 kio_trash           
 1579 kaiwens  20  0  546m  10m 4612 S  0.0  0.3  0:00.30 tracker-store       
 1949 kaiwens  20  0  295m 9.8m 8008 R  4.9  0.3  0:06.75 kio_file           
 1954 kaiwens  20  0  295m 9.8m 8008 S  0.0  0.3  0:00.03 kio_file           
 1581 kaiwens  20  0  226m 8324 6272 S  0.0  0.2  0:00.06 seapplet           
 1415 kaiwens  20  0  297m 7440 5964 S  0.0  0.2  0:00.09 klauncher           
 1582 kaiwens  39  19  443m 7356 5176 S  0.0  0.2  0:00.28 tracker-miner-f     
 1725 root      20  0  436m 7064 4972 S  0.0  0.2  0:00.17 colord             
 1585 kaiwens    9 -11  521m 6992 4592 S  0.0  0.2  0:01.12 pulseaudio         
 1576 kaiwens  20  0  226m 6544 5028 S  0.0  0.2  0:00.05 abrt-applet         
 1056 root      20  0 86096 6444 2148 S  0.0  0.2  0:00.00 dhclient           
 1518 kaiwens  20  0  290m 6376 3624 S  0.0  0.2  0:00.02 deja-dup-monito     
 1586 kaiwens  20  0  335m 6300 4568 S  0.0  0.2  0:00.04 tracker-miner-f     
 1568 kaiwens  20  0 33240 5948 1552 S  0.0  0.2  0:00.03 restorecond         
  977 root      20  0  208m 5472 3568 S  0.0  0.1  0:00.13 polkitd             
 1473 root      20  0  126m 5416 2580 S  0.0  0.1  0:00.31 udisks-daemon       
 1719 root      20  0  200m 5320 2784 S  0.0  0.1  0:00.04 cupsd               
  928 root      20  0  173m 5252 4228 S  0.0  0.1  0:00.09 NetworkManager     
  424 root      20  0 20400 4740 1120 S  0.0  0.1  0:00.14 udevd               
 1414 kaiwens  20  0  254m 4720 3128 S  0.0  0.1  0:00.08 kdeinit4           
 1307 kaiwens  20  0  318m 4636 3796 S  0.0  0.1  0:00.03 imsettings-daem     
 1572 kaiwens  20  0  185m 4444 1908 D  0.0  0.1  0:00.01 dconf-service       
 1642 kaiwens  20  0  116m 4396 1592 S  0.0  0.1  0:00.18 bash               
 1596 kaiwens  20  0  284m 4036 3372 S  0.0  0.1  0:00.01 xsettings-kde       
 1744 root      20  0 20396 3916  292 S  0.0  0.1  0:00.00 udevd               
 1640 kaiwens  20  0  172m 3908 3184 S  0.0  0.1  0:00.01 gvfs-gdu-volume     
 1741 root      20  0 20396 3896  272 S  0.0  0.1  0:00.00 udevd               
 1659 kaiwens  20  0  168m 3660 3076 S  0.0  0.1  0:00.00 gvfsd-trash         
 1428 root      20  0  150m 3504 2704 S  0.0  0.1  0:00.13 upowerd             
 1103 root      20  0  107m 3432 2620 S  0.0  0.1  0:00.07 kdm                 
 1150 root      20  0 2034m 3332 2336 S  0.0  0.1  0:00.04 console-kit-dae

Thanks for your interest!

ukiuki 12-10-2011 03:31 PM

Quote:

Originally Posted by sunnieside-up (Post 4544858)
... I am copying large files...

How large are this files? What type of file system are you using? What about swap usage, how it goes while copying?
This link may be of interest to you.http://www.debian-administration.org/articles/388

Note that you have lots of processes running there and every little thing needs memory, I would disable things that are not in constant use, every lil bit helps if you do a lot of copy and if you really need it.
KDE does drain a lot RAM. Have you thought about add more RAM or switch to a lightweight WM?

check this(it still using a lot believe or not):
Code:

uki@ubox:~$ free -m
            total      used      free    shared    buffers    cached
Mem:          1086        343        743          0        31        192
-/+ buffers/cache:        119        967
Swap:          232          0        232
uki@ubox:~$

Other things to consider, processor and memory are not really the things that make a computer fast, the BUS come 1st, because everything have to travel through it, the slow side is the storage devices in comparison to the BUS like hard drives, CDROM, USB sticks etc, how fast is your hard drive? Are you copying from one hard drive to another, or is it USB to HD or USB to USB ? Think about ! :twocents:

Regards

sycamorex 12-10-2011 03:43 PM

Have a look at this article:
http://linuxologist.com/1general/3-r...might-be-slow/
It discusses possible scenarios.

sunnieside-up 12-11-2011 04:44 AM

Perhaps the cpu is being bogged down with io wait. I mean some programs respond sometimes, and some freeze for a while. It's interesting the difference between that and windows, when the whole computer freezes in windows as opposed to just some processes freezing. Idk though, I have 4 GB RAM and a 5200 RPM hdd... so my hardware is not the issue. I'm just wondering if anyone else also experiences system lag during a large file copy (> 1 minute).


All times are GMT -5. The time now is 06:02 AM.