Stoppt die Vorratsdatenspeicherung! Jetzt klicken & handeln!Willst du auch bei der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:

BFS vs CFS [Update 2]

Blogged by Max1 as Linux, bla... — Max1 So 25 Okt 2009 20:46
Tagged as: , , , ,

Wer Linux benutzt verwendet (in den allermeisten Fällen) einen Kernel mit dem Standard-Scheduler CFS (Completely Fair Scheduler).
Kernel Hacker Con Kolivas hat dem schon vor einiger Zeit ein völlig neues Konzept, den Brain Fuck Scheduler (BFS) entgegengestellt.

Der Grundunterschied der Auswirkungen für den User liegt in der ‘responsiveness’ des Systems. CFS ist darauf ausgelegt auf riesige Maschinen zu skalieren, und unterscheidet dabei nicht zwischen dem normalen Rechner für zu Hause oder einem 4096 CPU Gerät. (Die Zahl 4096 CPUs taucht in der Diskussion als Richtlinie für Skalierbarkeit immer wieder auf.)
Ebensowenig wird meist zwischen dem Einsatzgebiet, Desktop oder eben Server unterschieden. (Es gibt hierfür zwar einige Möglichkeiten in der Kernel Konfiguration, aber wer den Standardkernel seines Distributors verwendet, unterscheidet hier zwangsläufig nicht.)

Die Folge ist eine Trägheit die ich auch schon öfter bemerkt habe. Wenn ich z.B. große Dateimengen kopiere, nebenher vllt noch einige youtube videos schaue, fängt die Maus an zu ruckeln. Das Umschalten zwischen Arbeitsflächen dauert mehrere Sekunden. Und das alles obwohl die CPU Last unter 10% liegt. Sehr störend.

Nun verwende ich schon seit einigen Wochen den BFS. Um etwas zu testen habe ich vorhin mal wieder einen Kernel mit CFS gebootet, und auch gleich mal mehrere GB auf meinen USB Stick kopiert. Den direkten Vergleich zwischen den beiden Schedulern hatte ich so noch nie gezogen. Fakt ist: Diese Probleme die CFS beim Kopieren großer Datenmengen und anderen lastenden Vorgängen macht, Ruckeln der Maus, langsame Reaktion, sind unter einem Kernel mit BFS nicht vorhanden.

Ich kann nur jedem ans Herz legen, der leidenschaftlicher Linux Nutzer ist, seinen nächsten Kernel mit dem BFS zu kompilieren. Dazwischen liegen Welten!

Update 1: Gerade habe ich mal einen Kernel mit BFS304 (Version 0.304) kompiliert. Es ist immernoch 2.6.31 btw, mal sehen wie sich das auf die Stabilität auswirkt. (Alles oben geschriebene war 2.6.31 mit BFS221, und litt doch an der einen oder anderen Stabilitätsschwäche….)

Update 2: Die Abstürze die ich mit BFS221 noch ab und zu erlebt habe, sind bisher unter 304 nicht aufgetreten… :)

ASM-Gefrickel, gescripte, debugfs

Blogged by Max1 as Debian, Linux, bla... — Max1 Mo 1 Jun 2009 19:08
Tagged as: , , , ,

Da schaffe ich es doch tatsächlich, nach einem ohnehin schon recht komischen Wochenende, meine Arbeit von heute (gute 6 Stunden) mal eben zu löschen.

Aber der Reihe nach.

Zunächst habe ich mich die Tage doch tatsächlich mal am Patchen (man sollte hier vielleicht eher cracken sagen, aber das klingt für mein ‘Können’ zu hochtrabend) eines Programmes versucht. Nein, nicht weil ich es nicht kaufen will und auch nicht um den Patch zu veröffentlichen. (Was ich ganz sicher nicht tun werde…)
Mir waren nur Diskussionen aufgefallen, dass für die neue Version des Programms sogar der Patch/Crack/WasAuchImmer verkauft wird und es sonst keinen gäbe. Das hat mich dann doch dazu verleitet, mir einfach mal anzuschauen, ob das tatsächlich so schwer ist.
Ein (sehr gutes!) Flash-Tutorial zum Umgang mit OllyDBG und einige Stunden später war es dann geschafft, und es funktioniert sogar. Mehr schlecht als recht, da ich an einigen Stellen mehr auf gut Glück modifiziert habe… Es scheinen aber die richtigen Stellen gewesen zu sein.

So, dann gab es noch ein kleines Script um automatisiert (HTTP) POST-Requests zu fahren, in PHP. Auch das tut mittlerweile seinen Dienst.

Wenn ich dann nicht gerade eben meine Hausübung (es war etwas knifflig, mehrere Stunden Arbeit) gelöscht hätte, wäre soweit alles gut. Jetzt sitze ich hier von einer Gentoo Live-CD und krame mit debugfs in Inode-Tabellen rum. Die “DiskInternals Linux Recovery” bekommt aber auch mal eine Chance, ist vielleicht komfortabler als das Händische…sowas ärgert maßlos!

DNS [Update]

Blogged by Max1 as Linux, bla... — Max1 So 17 Mai 2009 17:05
Tagged as: , , ,

In Zeiten von “Zensursula” habe ich vorsichtshalber mal damit angefangen, nicht mehr die Tcom DNS Server zu verwenden.

Warum angefangen, ist doch schnell gemacht? Genau, dachte ich auch. Ich bin aber immernoch auf der Suche nach einem Dienst mit passabler Geschwindigkeit. Ich konnte mich noch nicht näher darum kümmern, daher habe ich erstmal auf OpenDNS umgestellt. Allerdings bin ich mit der Performance nicht zufrieden. Die Frage ist, ob das an OpenDNS, meinem Router, oder doch an der Art der Namensauflösung in GNU/Linux liegt? Oder stimmt an der resolvconf was nicht?

Komischerweise ist, wenn ich mit dem “host” Befehl teste, immer genau jeder zehnte aufruf um 3-4 Sekunden verzögert. (Mit immer der gleichen Domain als Parameter.) Und das hat sich auch nach der Installation von nscd nicht geändert. Was mir schon äußerst merkwürdig erscheint.
Ich werde mich heute Abend nochmal näher damit beschäftigen.

Update 1: Also das Problem scheint wirklich openDNS zu sein. Wenn ich manuell deren DNS Server ansteuere, habe ich die Hänger noch öfter. Allerdings ist nscd auch nicht unschuldig. Auch bei anderen DNS Servern, die bisher ohne Probleme laufen, habe ich besagte Hänger sowie ich nscd anwerfe. Allerdings erst nach dem 15-20. query nach der gleichen Domain. Sehr komisch. Jedenfalls klappt es ohne nscd (ich hoffe mal die Speedports haben auch einen DNS cache, sonst tut mir der Server Leid) und mit 82.229.244.191 als primary wunderbar. Der Server gehört OpenNIC, was den Vorteil hat, dass man z.B. auch .geek Domains auflösen kann. ;)
Der Server steht in Frankreich, wer noch nähere oder zusätzliche Server sucht wird hier fündig: http://wikileaks.org/wiki/Alternative_DNS
Ich habe den Server des FoeBuD e.V. als secondary.

Nach langer Zeit…

Blogged by Max1 as Debian, Linux, bla... — Max1 So 17 Mai 2009 14:17

… nehme ich mir nun endlich mal wieder die Zeit ein bisschen was zu berichten.

Einiges hat sich getan, seit meinem letzten Beitrag.

Mit dem Abitur in der Tasche bin ich momentan als Student der Informatik (Bachelor of Science) an der TU-Darmstadt anzutreffen. (Wenn auch nicht für lang, aber dazu (hoffentlich) in den nächstan Tagen mehr Details.)

Nachdem die Krise mit meinen Seagate-Platten überstanden ist, habe ich dann meine Rechnerfamilie erweitert.
Ein Thinkpad R400 ist es am Ende geworden, (Core 2 Duo T5870 2GHZ), mit einer 7200 rpm Festplatte, 9-Cell Akku und 4 GB DDR3 RAM.

Ich bin mit dem Geräte bisher sehr zufrieden, nur an der Akkulaufzeit spürt man die schnellere Festplatte, aber vielmehr noch den nicht ganz aktuellen Core 2 Duo. Die in den Thinkpad T-Modellen (und auch den meisten anderen Rs, vorallem die 500er) verbauten Core 2 Duos mit der Bezeichnung PXXXX verbrauchen doch nochmal gut ein Drittel weniger Strom als der bei mir verbaute T5870.
Allerdings war es mir das für die Preisersparnis wert, wenn man wirklich am Gerät arbeitet hält der Akku bisher ca. 5,5 Stunden, das reicht mir. (In den Modellen mit P Core 2 Duo (besonders der Thinkpad T-Reihe) sollen es bis zu 9 Stunden sein, ich denke mal 7-8 ist realistisch.)
Es läuft ein Hybrid-System aus Debian Squeeze und SID, wobei momentan alle Pakete komplett auf SID (unstable) Stand sind. Das muss momentan für die neuen Centrino 2 Plattformen sein. Und seit Kernel 2.6.29.2 läuft auch bluetooth.

Das einzige was noch nicht ganz so will wie ich sind die Sondertasten, damit muss ich mich die Tage mal befassen, dem HAL die fehlenden Belegungen beizubringen.

Ansonsten habe ich noch das Standardproblem (ist momentan bei allen meinen Rechnern der Fall) der fehlenden System-Sounds (Systemklänge) in Gnome. Egal ob EsoundD oder pulseaudio, die Server laufen, aber die Systemsounds nicht. Das muss also auch noch in Angriff genommen werden.

/home finally RAID-protected

Blogged by Max1 as Debian, Linux, bla... — Max1 Di 3 Feb 2009 12:28

I finally found the time to protect at least some partitions by a RAID1 array.

debian:/home/max# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid1 sda7[2] sdb7[1]
50395776 blocks [2/1] [_U]
[=======>.............] recovery = 36.1% (18207488/50395776) finish=6.5min speed=82215K/sec

unused devices:

Why not the whole disk? Well, for my root partition I, at least for now, prefer backing up my data manually. As RAID1 protects my data from a failing harddrive, it does NOT protect it from a failing user (i.e. me). So if I accidently delete something important (who knows), I can at least restore it.

Why don’t people (the ones that run a mailserver) care about RFCs?

Blogged by Max1 as English, bla... — Max1 Di 15 Jul 2008 13:13

It’s the second time this week now, that a quite big website uses a mailserver with DNS settings that do not resolve properly.

Why is that? In those two particular cases I don’t think the problem was ignorance concerning RFCs, but a wrong or yet not completely done configuration:

As an example: the host mail.example.com has an A-Record to the IP adrress 1.2.3.4 . And 1.2.3.4 has a correct reverse PTR entry for mail.example.com. BUT:
1.2.3.4 (well, because we are talking about reverse lookups here that is of course 4.3.2.1.in-addr.arpa) also has another PTR entry to mail.example2.com.
BUT: mail.example2.com does NOT have an A-Record that resolves to 1.2.3.4. In my cases it just didn’t have any A-Record.

So what happens is that the mailserver (in my case postfix) will do a reverse lookup of the IP. As a result it will get mail.example.com OR mail.example2.com randomly. If you specified reject_unknown_client_hostname it will try to match that result it got with the IP address the connect comes from doing a forward lookup.
Meaning: If the result of the first lookup was mail.example.com it will find a correct A-Record that resolves to the IP. All is fine.
But if the result of the first lookup was mail.example2.com it won’t find a matching a record and reject the email.

I find that really annoying. I mean, errors happen, but until now, only one of them has replied to my email containing information on the problem.

To everyone out there that has a mailserver: PLEASE configure your DNS entries properly ;)

For those who want to see what I mean live:

Try comspot.de or dataworld.de ;)

Dataworld.de has told me they will check the issue with their Administrators :) So if you find the error being corrected please tell me about it.

Why we love Microsoft – Outlook Express 6 and SASL Auth / SSL

Blogged by Max1 as Debian, English, Linux, bla... — Max1 Di 1 Jul 2008 10:57

Since I’m using Thunderbird for my emailing I didn’t know about that problem. But one site I’m hosting recently has Emailusers that are using Microsoft’s Outlook Express 6 (The one that ships with XP).

What I didn’t know is that OE6 neither handles SSL handshakes correctly, nor is able to authenticate the user properly via SASL auth.

So you either get an error saying the server doesn’t support SSL, but you see the server’s reply code being ‘250 OK’.
Or you get an error depending on sender-, helo-, and recipient restrictions you’ve got. In my case I have implemented various checks concerning the hostname of the qualified client and of course RBL. Both will reject the ‘normal’ user connecting with OE6.
Normally, when the client authenticates himself none of the above mentioned checks will be done, and for that matter none of the authenticated clients will be blocked.

But if you’re using OE, you will be. (Is that actually a bad thing? ;) )

So I hope the solution I’m going to test later on is going to work:

For the SSL thing you can add ssl_wrapper_mode to postfix’s main.cf and connect on port 465. That SHOULD be working.

The SASL Auth thing should be fixed by adding ‘broken_sasl-auth_clients = yes’ to main.cf .

I’ll post here whether it worked or not.

RBL against Spam – Still working?

Blogged by Max1 as bla... — Max1 Di 11 Mrz 2008 14:19

As you may have read over the last few days on several internet news services such as eg. Tecchannel, Realtime Blackhole Lists like eg. Spamhaus are seeming to become less effective against spam.

What I read is that spammers have started to change their IPs very fast, which results in spam mails being more likely to falsely pass RBL Filters.

So what to do about it? There are several possibilitys. One is to use a tool like Spamassassin that can check the mailbody (and the links in it) against databases on the internet and/or their internal (learning) filter.

But I’m not quite convinced yet to use such a system. It’s not just the configuration that might be a little more complicated than eg. RBLs. What also scares me off a little is the maintaining effort. A system like that is very likely to have at least a few false positives, that have to be marked as such, so that the system can ‘learn’ from it. I don’t know yet whether I like that kind of a solution.

But what else is there?

Is Greylisting an answer?
How it works is basically that it at first refuses any email that someone is trying to send to your server with an error like a server misconfiguration error. The sender’s IP is stored then, and after a little while (say, something like 5 minutes), when (and if) the server tries to resend the message to you, it will be accepted and the sender will be added to a whitelist.

The hope in that is that spammers either won’t try to send the email again, or that those extra 5 minutes were enough for the spammers to be detected by services such as spamhaus.

The idea is good, and I think I will implement greylisting on my server and try it – also to see how many ‘real’ mailservers and (free)mailservices there are that also do not try to resend an email after a failure (that would be a false positive then).

Attention: WEIRD!! To attract some spammers for testing purposes, I’m just publishing another emailaddress:

stest@klappspaten.info

Kernel 2.6.24-1 and Ralink WIFI

Blogged by Max1 as Debian, English, Linux, bla... — Max1 Mo 18 Feb 2008 20:21

I ran into this issue about two weeks ago, but didn’t get through to writing about it.

The new (Debian) Kernel 2.6.24-1-amd64 no comes with ‘built in’ drivers and firmware for various Ralink WIFI devices. E.g. there are drivers for both PCI and USB devices (rt2×00 chipsets, including rt2500 (pci), rt2400) from rt2×00.serialmonkey.com compiled as modules into the kernel.
Unfortunately, those drivers really didn’t work out for me. My WIFI PCI Card has got a Ralink rt2500 chipset. I used to compile the module myself, using the rt2500 drivers from rt2×00.serialmonke.com CVS.
But with kernel 2.6.24-1 various modules, such as rt2×00, rt2×00pci, rt2500, rt2500pci, were loaded automatically. But the result wasn’t what I had hoped for. Even though my WIFI card was recognized immediately and connecting to my WIFI was really easy, because of the new GNOME network manager that includes WIFI connections, the transferrate always went down to 1 Mbit/s.

I could not manage to get it faster.

So the conclusion, I built the kernel again, manually, without any WIFI support included. Then I used those nice rt2500 CVS drivers from serialmonkeys.org and all works fine again :)

Currently I’m spending my very rare free time (I’m pretty busy with school right now) on getting my gentoo installation to work properly ;)

Edit: (Thanks adlerweb): Yeah I know I could’ve blacklisted the built-in modules, but I was in the mood (and found some time ;) ) for some ‘handicrafts’

logcheck and SPF

Blogged by Max1 as Debian, Linux, bla... — Max1 Mo 10 Dez 2007 20:49

Since I’m trying out logcheck an logcheck-database (the etch packages) and SPF I had to add some lines for logcheck to ignore. However some of them are not really SPF related.

(weiterlesen…)

Siemens Router Gigaset SE555 WLAN DSL oder wer braucht schon Sicherheit?

Blogged by Max1 as bla... — Max1 Di 2 Okt 2007 16:56
Tagged as: , , ,

Vorhin beim experimentieren mit einem Router-Restart Script (Wunder: in PHP ;) ) traf mich fast der Schlag.

Ich dachte ich müsste mich wenigstens beim Router autorisieren….

Aber ein einfacher HTTP-POST-REQUEST mit einem leeren String an ROUTER_IP/cgi-bin/restart.exe startet den Router neu. Ohne Autorisierung, ohne Meldung, ohne alles.

Wenigstens einen schwachen Trost gibt es, von außerhalb über das Internet klappt das ganze nicht… oder liegt das daran, dass ich Port 80 umgeleitet habe? Im Router ist auch ein Webserver integriert…. nach dieser Erfahrung probiere ich den aber lieber nicht aus.

Siemens wurde jedenfalls von mir informiert.

Updating wbb 1.2 to phpbb 2 / 3

Blogged by Max1 as English, Linux, bla... — Max1 So 2 Sep 2007 18:05
Tagged as: , , , , ,

For my work I have merged Woltlab Burning Board (wbb) 1.2 to phpbb 2 (that of course can then be updated to phpbb 3).

My environment is PHP5 and MySQL 5. Some problems I’ve been facing could possibly be *not* apearing on older installations of PHP/MySQL.

What you need for that is:

The phpBB 2.0.0 installation didn’t work correctly because I’m using MySQL 5 (the installation worked (during the setup just check MySQL 4.x when you’re asked) but I e.g. couldn’t log in) but I don’t think this is going to be a problem.

What you have to do first (after installing phpBB 2.0.0) is to make the images / avatars and images / smilies wirteable by the webserver (chmod 777/700 on suPHP servers).

Now we do the important change. Since the converter is natively made for WBB 1.1.X , you have to make the following changes:

(Codechange #1) Find every line that contains _data.inc.php in import.php and change it to admin/_data.inc.php. There should only be two lines with that path, so not much to change.

(Codechange #2) Then you have to edit the beginning of import.php and set the correct paths. Only edit this first 3-4 lines !

Afterwards upload the files (import.php and import_db.php) to your WBB folder on the server.

Now go to yourdomain.com/yourwbbfolder/import.php in your browser.

If you are receiving this error right now: ERROR: Unable to find wBB global.php include.
Check path defines.
You either didn’t do Codechange 1 or 2.

Now click on Start Import.

Then do the next step.

If you receive any error like: “Forumname: All Forums need a category” which I did quite a few times, do that:

(Databasechange #1) You have to edit the WBB boards table (e.g. with phpmyadmin) in that way, that every forum has a parent.
That means we need to edit the “boardparentid” for each board that is displayed to us in the error message (after you fixed one and refreshed the importer you might probably get that error again for another forum). For me it worked to just set “boardparentid” to 1 for every board. Of course that configuration is then wrong after the update, because not every board was having 1 as parent when we started, but we can change that later in the new forum.

Then we go for the next step:

You will get an error: * Deleting existing users :: OK
Fatal error: Cannot access empty property in …../webs/Max1/hwsboard/import_db.php on line 81

(Codechange #3) As this is a “normal” PHP parse error, we can simply fix this by finding the wrong code, which is the following in import_db.php :

$this->free_result($this->$query_id);

This of course has to be:

$this->free_result($this->query_id);

Reupload the files and you will get some further.

After that I got: * Converting moderators ::
Database error in WoltLab Burning Board: Invalid SQL: SELECT objectid, boardid FROM bb1_object2board WHERE mod = ‘1′

Unfortunately I couldn’t really find a fix for that as this seems to be a problem because I’m using MySQL 5 and all the scripts are just old.
The easiest way to get round this is to comment that part in import.php out.

(Codechange #4)

So put this:

// Moderators convert
print ” * Converting moderators :: “;
flush();
$user_mods = array();
$moderators = $DB_site->query(“SELECT objectid, boardid FROM bb”.$n.”_object2board WHERE mod = ‘1′”) or die_nice(“Unable to get moderators”);
while (list($objectid,$forumid) = $DB_site->fetch_array($moderators)) {
$user_mods[] = $objectid;
$group_query = $db->sql_query(“SELECT group_id FROM ” . USER_GROUP_TABLE . ” WHERE user_id=”.$objectid) or die_nice(“Unable to get group_id for user”);
list($groupid) = $db->sql_fetchrow($group_query);
$db->sql_query(“INSERT INTO ” . AUTH_ACCESS_TABLE . ” (group_id, forum_id, auth_mod) VALUES ($groupid, $forumid, 1)”) or die_nice(“Unable to insert moderators”);
}
// Update user_level for users that are moderator
if (count($user_mods)) {
$sql = “UPDATE ” . USERS_TABLE . ”
SET user_level = ” . MOD . ”
WHERE user_id IN (” . implode(“, “, $user_mods) . “) AND user_level <> ” . ADMIN;
$db->sql_query($sql) or die_nice(“Couldn’t update user levels to moderator”);
}

into /* …. */. This means that moderator information is not going to be updated and we have to reassign moderators manually afterwards.

The next step is topics. It worked just as is for me.

Then posts. Then polls.

* Importing polls ::
ERROR: Unable to insert poll options

That again isn’t too difficult to fix.

(Codechange #5)

Find that part in import.php:

while ($opt = $DB_site->fetch_array($opt_query))
{
$ins_opt_sql = “insert into phpbb_vote_results (vote_id, vote_option_text, vote_result) values (” . $poll[pollid] . “, ‘” . addslashes($opt['field']) . “‘, ” . $opt['votes'] . “)”;
$db->sql_query($ins_opt_sql) or die_nice(“Unable to insert poll options”);
}

(Or simply search for Unable to insert poll options in import.php)

We can easily see that “Insert Into phpbb_vote_results …” can’t be correct. That query isn’t using our defined prefix for the phpBB DB but just the default. So change that default to your setting. E.g. if your prefix is phpbb2 change it to phpbb2_vote_results.

Next: pm.

Next: wordlist.

Next: end.

And that’s it (hopefully). How far all that is working with an update to phpBB 3 afterwards… we will see ;)

So long.


Proudly powered by wordpress 2.9.2 - Theme Back in Black 2 by neuro
Copyright © 2006-2007 schlaflos-in-mainz.de - All rights reserved
Impressum / Disclaimer