Author Topic: 0.26.5 - Expand Decoder Sleep parameters  (Read 5811 times)

Offline Watcher

  • Contributor
  • ***
  • Posts: 23
0.26.5 - Expand Decoder Sleep parameters
« on: November 03, 2007, 08:15:10 PM »
Decoder sleep cycle maxes at 4000 lines. Many reasonable yEnc posts are using 7500 lines (under 1MB per article). The max should be 10k with default of 2500.

Offline Bad_Ad84

  • Contributor
  • ***
  • Posts: 33
0.26.5 - Expand Decoder Sleep parameters
« Reply #1 on: November 03, 2007, 09:07:54 PM »
well i was the one who semi requested this. even with 4000 and sleep for 100ms, my machine now is responsive and doesnt max out the processor.

im asuming this just means it sleeps before end of article then continues... doesnt sound like this is much of a issue and will change a great deal...but any improvements is good too

Offline Rdl

  • Administrator
  • *****
  • Posts: 3918
0.26.5 - Expand Decoder Sleep parameters
« Reply #2 on: November 03, 2007, 09:33:59 PM »
You're both looking at those 2 values the wrong way.

If you want to slow down decoding you want to find optimum between those values.

15000000 yenc file

~120000 lines (128 char per line+overhead)

If file normaly decodes in 5000ms (5s) then the math should be like this with values set to 4000 lines and 100ms

Your normal processing speed is 24 lines per ms. So every 166ms (4000 lines) you'll pause for 100ms. So when you look at cpu usage graph it would be very spiky. We don't want that. We want flat cpu usage line.
Final decoding time should be: 5000ms(normal decoding) + 120000lines/4000lines*100ms=8000ms (8seconds)

In order to do that we need to lower lines value and lower sleep value
Lets try math for 40lines/1ms

5000ms + 120000lines/40lines*1ms = 8000ms Again 8s but this time cpu usage graph is flat line, no spikes at all.