[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9b1675090904021759u5c9110fbpcc1e01f4db230370@mail.gmail.com>
Date: Thu, 2 Apr 2009 18:59:27 -0600
From: "Trenton D. Adams" <trenton.d.adams@...il.com>
To: Christian Kujau <lists@...dbynature.de>
Cc: Artem Bityutskiy <Artem.Bityutskiy@...ia.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: EXT4-ish "fixes" in UBIFS
On Thu, Apr 2, 2009 at 6:54 PM, Trenton D. Adams
<trenton.d.adams@...il.com> wrote:
> On Thu, Apr 2, 2009 at 6:38 PM, Christian Kujau <lists@...dbynature.de> wrote:
>> On Thu, 2 Apr 2009, Trenton D. Adams wrote:
>>> I'm thinking of writing a script that monitors performance, and
>>> remounts as needed, lol. WHAT A HACK. hehe.
>>
>> Ugh....my brain hurts :-\
>>
>> Christian.
>
> Yeah, mine too.
>
Just to make it hurt more for you, here you go...
On one console I run...
dd if=/dev/zero of=/tmp/bigfile bs=1M count=2000
On another I run...
perf-mon.sh
remounting with sync option, performance dropping
remounting without sync option, performance has stabilized
It may be better to write a C program that does a 1M fsync, and if
it's taking too long, then remount, lol. Also, this script here,
using 1 min load average, will catch CPU intensity as well, which is
not really what I want. Ah, it is a hack indeed. ROFL
#!/bin/sh
while true; do
UPTIME=$(uptime | xargs | cut -d ' ' -f10 | sed 's/,//');
if [ "$(echo "$UPTIME > 1" | bc)" -eq "1" ]; then
mount | egrep 's-sys.*sync' >/dev/null
if [ "$?" -ne "0" ]; then
echo "remounting with sync option, performance dropping";
mount -o remount,rw,sync /dev/s/sys /;
fi
else
mount | egrep 's-sys.*sync' > /dev/null
if [ "$?" -eq "0" ]; then
echo "remounting without sync option, performance has stabilized";
mount -o remount,rw /dev/s/sys /;
fi
fi;
sleep 1
done
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists