Page 2 of 2 FirstFirst 12
Results 11 to 19 of 19

Thread: Copying is very very CPU intensive

  1. #11
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Copying is very very CPU intensive

    On 2012-02-20 00:46, atskler wrote:
    >
    >> Then try in text mode (ctrl-alt-f1), outside of kde. Even better, before
    >> you log into kde.

    >
    > Tried. I started my system without xdm, KDE. The situation is exactly
    > the same.


    Then I have no idea...

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  2. #12
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Copying is very very CPU intensive

    On 02/20/2012 12:46 AM, atskler wrote:
    > The situation is exactly the same.


    then what remains constant that _might_ cause the symptom:

    hardware (drive, cable and/or disk controller board)? heat?
    software: using RAID? reiserfs? brtfs? with vs without encryption? BIOS
    problem (upgrade)?

    --
    DD http://tinyurl.com/DD-Caveat
    Read what Distro Watch writes: http://tinyurl.com/SUSEonDW

  3. #13

    Default Re: Copying is very very CPU intensive

    OK. I did some further research.
    I found this:
    Code:
    /usr/src/linux-3.1.9-1.4/Documentation/workqueue.txt
    It says:

    7. Debugging

    Because the work functions are executed by generic worker threads
    there are a few tricks needed to shed some light on misbehaving
    workqueue users.

    Worker threads show up in the process list as:

    Code:
    root      5671  0.0  0.0      0     0 ?        S    12:07   0:00 [kworker/0:1]
    root      5672  0.0  0.0      0     0 ?        S    12:07   0:00 [kworker/1:2]
    root      5673  0.0  0.0      0     0 ?        S    12:12   0:00 [kworker/0:0]
    root      5674  0.0  0.0      0     0 ?        S    12:13   0:00 [kworker/1:0]
    If kworkers are going crazy (using too much cpu), there are two types
    of possible problems:

    1. Something beeing scheduled in rapid succession
    2. A single work item that consumes lots of cpu cycles

    The first one can be tracked using tracing:

    Code:
    	$ echo workqueue:workqueue_queue_work > /sys/kernel/debug/tracing/set_event
    	$ cat /sys/kernel/debug/tracing/trace_pipe > out.txt
    	(wait a few secs)
    	^C
    If something is busy looping on work queueing, it would be dominating
    the output and the offender can be determined with the work item
    function.

    For the second type of problems it should be possible to just check
    the stack trace of the offending worker thread.

    Code:
    	$ cat /proc/THE_OFFENDING_KWORKER/stack
    The work item's function should be trivially visible in the stack
    trace.

    And my out.txt - http://atskler.net/dbg/out.txt (3 MB!) - is full with:


    Code:
    function=kcryptd_crypt
    function=do_dbs_timer
    function=flush_to_ldisc

    So my problem, as you correctly thought, at least in one part arises form disk encryption.


    ___

    Related docs:
    High CPU Utilization When Copying to Ext4
    Hard performance hit after encrypting

  4. #14
    Join Date
    Jun 2008
    Location
    Earth - Denmark
    Posts
    10,730

    Default Re: Copying is very very CPU intensive

    On 02/20/2012 02:56 PM, atskler wrote:
    >
    > I found this:
    > /usr/src/linux-3.1.9-1.4/Documentation/workqueue.txt
    >
    > So my problem, as you correctly thought, at least in one part arises
    > form disk encryption.


    cool find...i've never been in that directory before...it is mostly over
    my head...but very happy it is useful to you..

    what i do not know is, if this crypt slowdown is more than should be
    expected, or not...i don't know, maybe the crypto code needs work, or
    maybe the high use of CPU ticks is expected and 'normal'..

    you might join an irc channel and see if a crypto-wise kernel kruncher
    is hanging out...begin here:
    http://en.opensuse.org/openSUSE:Communication_channels

    --
    DD http://tinyurl.com/DD-Caveat http://tinyurl.com/SUSEonDW

  5. #15

    Default Re: Copying is very very CPU intensive

    > what i do not know is, if this crypt slowdown is more than should be
    > expected, or not...i don't know, maybe the crypto code needs work, or
    > maybe the high use of CPU ticks is expected and 'normal'..


    you are right, as I said I used Truecrypt in Windows and in this - in Linux too - there is a benchmark function where you can check the speed of the different kind of encryption in RAM. In my system:
    AES 184 MB/s
    Twofish 153 MB/s
    Serpent 79 MB/s
    AES-Twofish 79 MB/s
    Serpent-AS 52 MB/s
    Twofish-Serpent 52 MB/s
    Serpent-Twofish-AES 40 MB/s
    AES-Twofish-Serpent 40 MB/s

    So, one of my thoughts is that OpenSuSE 12.1 installer chooses something stronger and/or slower encryption than Truecrypt's AES. Currently I'm trying to find out this encryption type and then somehow benchmarking it in RAM.



    > you might join an irc channel and see if a crypto-wise kernel kruncher
    > is hanging out...begin here:
    > openSUSE:Communication channels - openSUSE


    I'm really inexperienced in English, and in Linux too. It would be difficult to me ...

    --
    DD DD Caveat DistroWatch.com: openSUSE[/QUOTE]

  6. #16
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Copying is very very CPU intensive

    On 2012-02-20 18:14, DenverD wrote:
    > what i do not know is, if this crypt slowdown is more than should be
    > expected, or not...i don't know, maybe the crypto code needs work, or maybe
    > the high use of CPU ticks is expected and 'normal'..


    It depends on the data, I guess, and the cpu used.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  7. #17
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Copying is very very CPU intensive

    On 2012-02-20 19:06, atskler wrote:

    > So, one of my thoughts is that OpenSuSE 12.1 installer chooses
    > something stronger and/or slower encryption than Truecrypt's AES.
    > Currently I'm trying to find out this encryption type and then somehow
    > benchmarking it in RAM.


    It is not that simple, you have to create the encrypted filesystem manually
    and then test it.

    To find out what you are using, do something like this:

    Telcontar:~ # file -s /dev/sdc9
    /dev/sdc9: LUKS encrypted file, ver 1 [aes, cbc-essiv:sha256, sha1] UUID: 4*3

    To do it fast, you will have to script it.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  8. #18

    Default Re: Copying is very very CPU intensive

    I measured my system and it can encrypt with ~105 MB/sec.
    I made further investigations and I think my problem comes from I/O scheduling and from caching.

    Currently I have a lot of work and I suspended my research on my problem.

  9. #19
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Copying is very very CPU intensive

    On 2012-02-23 17:16, atskler wrote:
    >
    > I measured my system and it can encrypt with ~105 MB/sec.


    That's about a typical hard disk limit. Measure the HD speed on non
    encrypted writes.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •