LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   dm-ioband : limiting bandwidth for specifics jobs (https://www.linuxquestions.org/questions/linux-newbie-8/dm-ioband-limiting-bandwidth-for-specifics-jobs-902957/)

markos87 09-14-2011 06:53 AM

dm-ioband : limiting bandwidth for specifics jobs
 
Hello everybody,

This is my situation:
--I'm working with only one partiton so i made:
Code:

echo "0 $(blockdev --getsize /dev/sda3) ioband /dev/sda3 1 0 0 none weight 0 :100" | dmsetup create ioband1
mkfs.ext3 /dev/mapper/ioband1
mount /dev/mapper/ioband1 /mnt

2) Now I have two job to assign on the same partition:

---job_1: I want to assign to this job the 80% of bandwidth
---job_2: have the 20% of BW.

I've tried to get the PID of both the job and made:

Code:


arg="--size=30m --rw=randrw --numjobs=2 --group_reporting "

./fio $arg --name=$! --directory=/mnt --output=io1.log &

pid_1=$!
dmsetup message ioband1 0 type user
dmsetup message ioband1 0 attach $pid_1
dmsetup message ioband1 0 weight $pid_1:80
echo $pid_1

./fio $arg --name=$! --directory=/mnt --output=io2.log &

pid_2=$!
dmsetup message ioband1 0 attach $pid_2
dmsetup message ioband1 0 weight $pid_2:20
echo $pid_2

wait


But I think that somethings doesn't work as I wish...
Anyone can help me please??

Thank you...


All times are GMT -5. The time now is 03:45 PM.