Hozzászólások
Sziasztok,
Vegigbongesztem a vinyos forumokat, de ha valaki talalkozott is a problemammal azt nem talaltam meg. A problemam konkretan az, hogy 5-10 masodpercenkent valamilyen adat irasra kerul a vinyora (legalabbis felvillan a ledje, es hallatszik a hangja).
Mar gondoltam arra, hatha az ext3 naplojat irja ki a kernel, de nem tudom, hogyan lehet a commit interval-t novelni (kerestem de nem talaltam). Ezt hogyan lehet?
Amennyiben esetleg nem emiatt fordul mindig a linux a vinyohoz, hogyan lehetne kideriteni, mi hasznalja a vinyot?
Koszi elore is a segitsegeket.
- A hozzászóláshoz be kell jelentkezni
mount optionként a commit paramétert kell állítanod, bővebben is benne van a kernel forrasban a Documentation/filesystems/ext3.txt-ben
[quote:ca8bb7dcb2="Hijaszu"]Sziasztok,
Vegigbongesztem a vinyos forumokat, de ha valaki talalkozott is a problemammal azt nem talaltam meg. A problemam konkretan az, hogy 5-10 masodpercenkent valamilyen adat irasra kerul a vinyora (legalabbis felvillan a ledje, es hallatszik a hangja).
Mar gondoltam arra, hatha az ext3 naplojat irja ki a kernel, de nem tudom, hogyan lehet a commit interval-t novelni (kerestem de nem talaltam). Ezt hogyan lehet?
Amennyiben esetleg nem emiatt fordul mindig a linux a vinyohoz, hogyan lehetne kideriteni, mi hasznalja a vinyot?
Koszi elore is a segitsegeket.
- A hozzászóláshoz be kell jelentkezni
[quote:c6d80265b2="Hijaszu"]Sziasztok,
Vegigbongesztem a vinyos forumokat, de ha valaki talalkozott is a problemammal azt nem talaltam meg. A problemam konkretan az, hogy 5-10 masodpercenkent valamilyen adat irasra kerul a vinyora (legalabbis felvillan a ledje, es hallatszik a hangja).
Mar gondoltam arra, hatha az ext3 naplojat irja ki a kernel, de nem tudom, hogyan lehet a commit interval-t novelni (kerestem de nem talaltam). Ezt hogyan lehet?
Amennyiben esetleg nem emiatt fordul mindig a linux a vinyohoz, hogyan lehetne kideriteni, mi hasznalja a vinyot?
Koszi elore is a segitsegeket.
Te barátod: /proc/sys/vm/bdflush
2.4-es kernel fs/buffer.c alapján:
[code:1:c6d80265b2]
union bdflush_param {
struct {
int nfract; /* Percentage of buffer cache dirty to
activate bdflush */
int ndirty; /* Maximum number of dirty blocks to write out per
wake-cycle */
int dummy2; /* old "nrefill" */
int dummy3; /* unused */
int interval; /* jiffies delay between kupdate flushes */
int age_buffer; /* Time for normal buffer to age before we flush it */
int nfract_sync;/* Percentage of buffer cache dirty to
activate bdflush synchronously */
int nfract_stop_bdflush; /* Percetange of buffer cache dirty to stop bdflush */
int dummy5; /* unused */
} b_un;
unsigned int data[N_PARAM];
} bdf_prm = {{30, 500, 0, 0, 5*HZ, 30*HZ, 60, 20, 0}};
/* These are the min and max parameter values that we will allow to be assigned */
int bdflush_min[N_PARAM] = { 0, 1, 0, 0, 0, 1*HZ, 0, 0, 0};
int bdflush_max[N_PARAM] = {100,50000, 20000, 20000,10000*HZ, 10000*HZ, 100, 100, 0};
[/code:1:c6d80265b2]
Valamint a 2.4-es Documentation/sysctl/vm.txt alapján:
[code:1:c6d80265b2]
bdflush:
--------
This file controls the operation of the bdflush kernel
daemon. The source code to this struct can be found in
fs/buffer.c. It currently contains 9 integer values,
of which 6 are actually used by the kernel.
nfract: The first parameter governs the maximum
number of dirty buffers in the buffer
cache. Dirty means that the contents of the
buffer still have to be written to disk (as
opposed to a clean buffer, which can just be
forgotten about). Setting this to a high
value means that Linux can delay disk writes
for a long time, but it also means that it
will have to do a lot of I/O at once when
memory becomes short. A low value will
spread out disk I/O more evenly, at the cost
of more frequent I/O operations. The default
value is 30%, the minimum is 0%, and the
maximum is 100%.
ndirty: The second parameter (ndirty) gives the
maximum number of dirty buffers that bdflush
can write to the disk in one time. A high
value will mean delayed, bursty I/O, while a
small value can lead to memory shortage when
bdflush isn't woken up often enough. The
default value is 500 dirty buffers, the
minimum is 1, and the maximum is 50000.
dummy2: The third parameter is not used.
dummy3: The fourth parameter is not used.
interval: The fifth parameter, interval, is the minimum
rate at which kupdate will wake and flush.
The value is in jiffies (clockticks), the
number of jiffies per second is normally 100
(Alpha is 1024). Thus, x*HZ is x seconds. The
default value is 5 seconds, the minimum is 0
seconds, and the maximum is 10,000 seconds.
age_buffer: The sixth parameter, age_buffer, governs the
maximum time Linux waits before writing out a
dirty buffer to disk. The value is in jiffies.
The default value is 30 seconds, the minimum
is 1 second, and the maximum 10,000 seconds.
sync: The seventh parameter, nfract_sync, governs
the percentage of buffer cache that is dirty
before bdflush activates synchronously. This
can be viewed as the hard limit before
bdflush forces buffers to disk. The default
is 60%, the minimum is 0%, and the maximum
is 100%.
stop_bdflush: The eighth parameter, nfract_stop_bdflush,
governs the percentage of buffer cache that
is dirty which will stop bdflush. The default
is 20%, the miniumum is 0%, and the maxiumum
is 100%.
dummy5: The ninth parameter is not used.
So the default is: 30 500 0 0 500 3000 60 20 0 for 100 HZ.
=============================================================
[/code:1:c6d80265b2]
2.4-es kernel esetén, ha 30s-t szeretnél az 5s helyett, akkor ezt csinálod:
[code:1:c6d80265b2]
echo "30 500 0 0 3000 3000 60 20 0" > /proc/sys/vm/bdflush
[/code:1:c6d80265b2]
A levezetést 2.6-os kernel esetén rád bízom.
Üdv,
Dw.
- A hozzászóláshoz be kell jelentkezni