System "almost" perfect! (SOLVED)

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: System "almost" perfect! (SOLVED)

Post by autostatic »

falkTX wrote:I don't have real proof, but I know I completely broke my laptop HDD when using "tricks" to get faster R/RW speeds (luckily my warranty was still in place).
I never used such "tricks" again and my laptop seems fine after 1.5 years...
Ouch... I've been using it on my netbook for over 2 years now, never had any issues. And that netbook is a cheap-*ss machine. And is noatime related to R/RW speeds? I thought it was mainly used in relation to decreasing overhead.
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: System "almost" perfect! (SOLVED)

Post by briandc »

AutoStatic wrote:
briandc wrote:Ok; so if I wanted to run at 1000 Hz, I'd have to recompile the kernel.
Would it be worth doing? I mean, things seem to be working very well at the moment, the only time I get an xrun is maybe when closing an app or opening another. Would I notice a major change in performance?
You shouldn't get any xruns when opening or closing apps, not even with a generic kernel. Maybe a self-compiled real-time kernel will help, I wouldn't recompile the 3.0.23 real-time kernel. There are newer kernels and RT patchsets available that run more stable. I've described in the Wiki how to build one yourself.
briandc wrote:As I showed in the output above, I have another kernel in the same directory. Can I deactivate one and activate the other? Maybe the other (I suppose the one used when I installed Ubuntu Studio) would be at 1000 Hz..
Yes you can boot into another kernel. When you boot your PC you should get a bootloader (GRUB) and in that menu you should be able to select the Ubuntu Studio lowlatency kernel. That one is at 1000Hz yes.
briandc wrote:If you and falkTX think that my system is set up fine, then I trust you both and I'm happy. Like I said, things seem to be performing very well.
You shouldn't get any xruns so there's room for improvement I think. Which applications are causing xruns on opening and closing for example?
I think I could follow your wiki and do it right; funny you mention the bootloader: I don't see anything at all, just the log-in screen! Do I have to go into BIOS?


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: System "almost" perfect! (SOLVED)

Post by autostatic »

briandc wrote:I think I could follow your wiki and do it right; funny you mention the bootloader: I don't see anything at all, just the log-in screen! Do I have to go into BIOS?
No need to go into the BIOS. Since you probably have only one OS on your computer Ubuntu hides the bootloader menu. You can change that behaviour by editing /etc/default/grub
In my case the relevant lines look like this:

Code: Select all

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
This shows the GRUB bootloader menu for 10 seconds.
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: System "almost" perfect! (SOLVED)

Post by briandc »

AutoStatic wrote:
briandc wrote:I think I could follow your wiki and do it right; funny you mention the bootloader: I don't see anything at all, just the log-in screen! Do I have to go into BIOS?
No need to go into the BIOS. Since you probably have only one OS on your computer Ubuntu hides the bootloader menu. You can change that behaviour by editing /etc/default/grub
In my case the relevant lines look like this:

Code: Select all

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
This shows the GRUB bootloader menu for 10 seconds.
I checked my grub file, it is set like yours already. BUT, grub is not installed. If I install it, it will remove :

-grub-gfxpayload-lists
-grub-pc
-grub2-common

Should I proceed?


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: System "almost" perfect! (SOLVED)

Post by autostatic »

No, that will install grub-legacy, an older version of grub. I'm probably forgetting a setting, I only have dual boot systems so I always have a grub menu at boot. But with settings like this it should always show:

Code: Select all

GRUB_HIDDEN_TIMEOUT=
GRUB_TIMEOUT=10
More info here: https://help.ubuntu.com/community/Grub2 ... ing_GRUB_2
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: System "almost" perfect! (SOLVED)

Post by briandc »

AutoStatic wrote:No, that will install grub-legacy, an older version of grub. I'm probably forgetting a setting, I only have dual boot systems so I always have a grub menu at boot. But with settings like this it should always show:

Code: Select all

GRUB_HIDDEN_TIMEOUT=
GRUB_TIMEOUT=10
More info here: https://help.ubuntu.com/community/Grub2 ... ing_GRUB_2
Ok; I got grub to display at startup. I changed kernels to the low-latency kernel, listed in the /boot directory:

Code: Select all

abi-3.2.0-23-lowlatency-pae         initrd.img-3.2.0-23-realtime-pae
abi-3.2.0-23-realtime-pae           memtest86+.bin
config-3.2.0-23-lowlatency-pae      memtest86+_multiboot.bin
config-3.2.0-23-realtime-pae        System.map-3.2.0-23-lowlatency-pae
config-3.2.0-23-realtime-pae~       System.map-3.2.0-23-realtime-pae
grub                                vmlinuz-3.2.0-23-lowlatency-pae
initrd.img-3.2.0-23-lowlatency-pae  vmlinuz-3.2.0-23-realtime-pae
It should now be running kernel 3.2.0-23-lowlatency-pae.

-But again, when I ran the config test, it tells me that I am not running a realtime kernel. :(

Looks like I'll have to follow your system configuration page to create the realtime kernel. Right?

From what I see in the config files, the reatime kernel I was using before had config_preempt_rt=y, but the Hz was at 250.
And in the current (low latency) kernel, I see the settings config_Hz_1000=y, but there is no rt=y line.

Looks like it's either one or the other..

(Sorry this is taking so long..)

brian
Last edited by briandc on Wed Aug 01, 2012 11:18 am, edited 1 time in total.
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: System "almost" perfect! (SOLVED)

Post by autostatic »

briandc wrote:Ok; I got grub to display at startup. I changed kernels to the low-latency kernel, listed in the /boot directory:
Ok, cool :)
briandc wrote:-But again, when I ran the config test, it tells me that I am not running a realtime kernel. :(
A lowlatency kernel is not a realtime kernel. A realtime kernel has the RT patchset applied which is not the case for a lowlatency kernel.
briandc wrote:Looks like I'll have to follow your system configuration page to create the realtime kernel. Right?
Since nobody is offering realtime kernel packages for Precise anymore, yes.
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: System "almost" perfect! (SOLVED)

Post by briandc »

AutoStatic wrote:
briandc wrote:Ok; I got grub to display at startup. I changed kernels to the low-latency kernel, listed in the /boot directory:
Ok, cool :)
briandc wrote:-But again, when I ran the config test, it tells me that I am not running a realtime kernel. :(
A lowlatency kernel is not a realtime kernel. A realtime kernel has the RT patchset applied which is not the case for a lowlatency kernel.
briandc wrote:Looks like I'll have to follow your system configuration page to create the realtime kernel. Right?
Since nobody is offering realtime kernel packages for Precise anymore, yes.

Ok, I'm at the point where I download the tarballs. I discovered that the patch you mention here:

wget -c http://www.kernel.org/pub/linux/kernel/ ... .patch.bz2

is no longer available. So I selected a newer one, patch-3.2.23-rt36.patch.bz2

Will this work fine with the 3.2.20 kernel? Or should I use the one you recommend (now in an older directory) ?

Just wanted to check before I proceed.. :)

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: System "almost" perfect! (SOLVED)

Post by briandc »

No, I decided to use the patch you suggested in your system configuration page, just to be safe.. ;)

proceeding..

brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: System "almost" perfect! (SOLVED)

Post by briandc »

I installed it! :)

However, the test config thing tells me it's not a realtime kernel!

Code: Select all

== GUI-enabled checks ==
Checking if you are root... no - good
Checking filesystem 'noatime' parameter... found - warning
/ does not have the 'noatime' parameter set
For more information, see http://wiki.linuxmusicians.com/doku.php?id=system_configuration#filesystems
Checking CPU Governors... CPU 0: 'performance' CPU 1: 'performance'  - good
Checking swappiness... 10 - good
Checking for resource-intensive background processes... none found - good
Checking checking sysctl inotify max_user_watches... >= 524288 - good
Checking access to the high precision event timer... readable - good
Checking access to the real-time clock... readable - good
Checking whether you're in the 'audio' group... yes - good
Checking for multiple 'audio' groups... no - good
yes - good.
Checking the ability to prioritize processes with chrt... yes - good
Checking kernel support for high resolution timers... found - good
Kernel with Real-Time Preemption... not found - not good
Kernel without real-time capabilities found
For more information, see http://wiki.linuxmusicians.com/doku.php?id=system_configuration#installing_a_real-time_kernel
Checking if kernel system timer is set to 1000 hz... found - good
Checking kernel support for tickless timer... not found - not good
Try enabling tickless timer support (CONFIG_NO_HZ)

== Other checks ==
Checking filesystem types... ok.
not found.
** Warning: no tmpfs partition mounted on /tmp
   For more information, see:
   - http://wiki.linuxmusicians.com/doku.php?id=system_configuration#tmpfs
   - http://lowlatency.linuxaudio.org
** Set $SOUND_CARD_IRQ to the IRQ of your soundcard to enable more checks.
   Find your sound card's IRQ by looking at '/proc/interrupts' and lspci.
I checked uname -a:

Code: Select all

Linux brian-kxstudio 3.2.20-rt32 #1 SMP PREEMPT RT Wed Aug 1 14:32:14 CEST 2012 i686 i686 i386 GNU/Linux
And yes, I did select "5" for preemption..

?????


brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: System "almost" perfect! (SOLVED)

Post by autostatic »

You can cd into your realtimeconfigquickscan directory and issue a:

Code: Select all

sed -i 's/CONFIG_PREEMPT_RT=y/CONFIG_PREEMPT_RT_FULL=y/g' PreemptRtCheck.pm
And then try running the script again.
User avatar
briandc
Established Member
Posts: 1442
Joined: Sun Apr 29, 2012 3:17 pm
Location: Italy
Has thanked: 58 times
Been thanked: 28 times
Contact:

Re: System "almost" perfect! (SOLVED)

Post by briandc »

AutoStatic wrote:You can cd into your realtimeconfigquickscan directory and issue a:

Code: Select all

sed -i 's/CONFIG_PREEMPT_RT=y/CONFIG_PREEMPT_RT_FULL=y/g' PreemptRtCheck.pm
And then try running the script again.
You make it look so EASY!! :)

Code: Select all

== GUI-enabled checks ==
Checking if you are root... no - good
Checking filesystem 'noatime' parameter... found - warning
/ does not have the 'noatime' parameter set
For more information, see http://wiki.linuxmusicians.com/doku.php?id=system_configuration#filesystems
Checking CPU Governors... CPU 0: 'performance' CPU 1: 'performance'  - good
Checking swappiness... 10 - good
Checking for resource-intensive background processes... none found - good
Checking checking sysctl inotify max_user_watches... >= 524288 - good
Checking access to the high precision event timer... readable - good
Checking access to the real-time clock... readable - good
Checking whether you're in the 'audio' group... yes - good
Checking for multiple 'audio' groups... no - good
yes - good.
Checking the ability to prioritize processes with chrt... yes - good
Checking kernel support for high resolution timers... found - good
Kernel with Real-Time Preemption... found - good
Checking if kernel system timer is set to 1000 hz... found - good
Checking kernel support for tickless timer... not found - not good
Try enabling tickless timer support (CONFIG_NO_HZ)

== Other checks ==
Checking filesystem types... ok.
not found.
** Warning: no tmpfs partition mounted on /tmp
   For more information, see:
   - http://wiki.linuxmusicians.com/doku.php?id=system_configuration#tmpfs
   - http://lowlatency.linuxaudio.org
** Set $SOUND_CARD_IRQ to the IRQ of your soundcard to enable more checks.
   Find your sound card's IRQ by looking at '/proc/interrupts' and lspci.
Will this configuration remain at next boot?

As for the other details (tickless timer, etc) I'm happy for now. I've been playing around with the kernel since I installed it and it seems to be working more than good. I think it's time to save my whole setup..

Thanks AutoStatic.. :)
brian
Have your PC your way: use linux!
My sound synthesis biome: http://www.linuxsynths.com
User avatar
autostatic
Established Member
Posts: 1994
Joined: Wed Dec 09, 2009 5:26 pm
Location: Beverwijk, The Netherlands
Has thanked: 32 times
Been thanked: 104 times
Contact:

Re: System "almost" perfect! (SOLVED)

Post by autostatic »

briandc wrote:Will this configuration remain at next boot?
Yes it will.
briandc wrote:As for the other details (tickless timer, etc) I'm happy for now.
Don't worry, I don't use a tickless kernel and noatime isn't really necessary too.
briandc wrote:Thanks AutoStatic.. :)
No problem :D
Thad E Ginathom
Established Member
Posts: 369
Joined: Fri Sep 23, 2011 1:03 pm

Re: System "almost" perfect! (SOLVED)

Post by Thad E Ginathom »

AutoStatic wrote:You can add the noatime parameter in your /etc/fstab, this is in the Wiki.
General advice. Before editing /etc/fstab, make a copy

$ cd /etc
$ sudo cp fstab fstab.0

Even linux/Unix/Command-line wizards are well advised to do this.

fstab is one of those files that can cause your machine to hang when booting. If this happens, then booting to a command line [however you choose to do it] and doing

# cp /etc/fstab.0 /etc/fstab

is a heap easier than editing the file again. Every edit includes the chance of mistakes, typos or to-be-discovered inconsistencies.

Grub hint: Get, and use, Grub Customiser :)
shimpe
Established Member
Posts: 39
Joined: Mon Jan 09, 2012 8:11 pm
Contact:

Re: System "almost" perfect! (SOLVED)

Post by shimpe »

General advice. Before editing /etc/fstab, make a copy

$ cd /etc
$ sudo cp fstab fstab.0
off-topic: wondering now if /etc could somehow be stored in a git repository,
with some way to revert to a previous version during early boot.
Secondly also wondering if that would lead to anything useful :)
Post Reply