Deleting buffer cache for IO throughput

by vrukesh » Fri, 29 May 2009 20:35:40 GMT


Sponsored Links
 Hi,

We are writing an application to measure throughput speed of SD card
on ARM-based Android target using Java APIs.

When we execute the application twice for read operation, results are
seen to be affected with buffer cache.

For example, first read throughput is 275 KBps and second read
throughput is 350KBps.

Application is simple Java-based application, it is .jar app. It is
not using the Application class  and hence, not having
AndroidManifest.xml present. ().

Is there any way to clear the buffer cache after each run of the
application ?

Thanks and Regards,
Vrukesh
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Nexus S boot problems

Hi,

I have built an unmodified kernel for the Nexus S but when I run it I
see the following error in my logcat output:

ERROR/FramebufferNativeWindow(190): couldn't open framebuffer HAL (No
such device)

- so although I can still adb shell onto the handset my boot has
failed at this point.


I am building an unmodified kernel as follows:

git clone git://android.git.kernel.org/kernel/samsung.git
cd samsung
make ARCH=arm CROSS_COMPILE=~/mydroid/prebuilt/linux-x86/toolchain/arm-
eabi-4.4.3/bin/arm-eabi- herring_defconfig
make ARCH=arm CROSS_COMPILE=~/mydroid/prebuilt/linux-x86/toolchain/arm-
eabi-4.4.3/bin/arm-eabi-

~/mydroid/out/host/linux-x86/bin/mkbootimg --cmdline 'console=ttyFIQ0
no_console_suspend' --base 0x30000000 --pagesize 4096 --kernel zImage
--ramdisk mtd2.img-ramdisk.gz -o boot.img

where -
mtd2.img-ramdisk.gz was extracted from the mtd2 image from my Nexus S
using split_bootimg.pl.
~/mydroid contains my gingerbread build
my build environment is Ubuntu 10.10 64bit in a VM

Can anyone suggest what I'm doing wrong? Thanks very much.

----------------------------------------------------------------------------------------------------------------------------------------------------
Here's the pertinent part of my boot log

03-16 09:58:04.113: INFO/Zygote(188): ...preloaded 1830 classes in
2016ms.
03-16 09:58:04.113: ERROR/Zygote(188): setreuid() failed. errno: 17
03-16 09:58:04.128: DEBUG/dalvikvm(188): GC_EXPLICIT freed 18K, 52%
free 2460K/5123K, external 0K/0K, paused 17ms
03-16 09:58:04.132: INFO/Zygote(188): Preloading resources...
03-16 09:58:04.148: DEBUG/dalvikvm(188): GC_EXTERNAL_ALLOC freed <1K,
52% free 2462K/5123K, external 0K/0K, paused 17ms
:
03-16 09:58:04.386: DEBUG/dalvikvm(188): GC_EXPLICIT freed 1K, 51%
free 2526K/5123K, external 1625K/2137K, paused 17ms
03-16 09:58:04.390: INFO/dalvikvm(188): System server process 190 has
been created
03-16 09:58:04.390: INFO/Zygote(188): Accepting command socket
connections
03-16 09:58:04.449: INFO/sysproc(190): Entered system_init()
03-16 09:58:04.449: INFO/sysproc(190): ServiceManager: 0x128df8
03-16 09:58:04.449: INFO/SurfaceFlinger(190): SurfaceFlinger is
starting
03-16 09:58:04.449: INFO/SurfaceFlinger(190): SurfaceFlinger's main
thread ready to run. Initializing graphics H/W...
03-16 09:58:04.453: ERROR/FramebufferNativeWindow(190): couldn't open
framebuffer HAL (No such device)
03-16 09:58:04.554: INFO/DEBUG(75): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
03-16 09:58:04.554: INFO/DEBUG(75): Build fingerprint: 'google/soju/
crespo:2.3.1/GRH78/85442:user/release-keys'
03-16 09:58:04.554: INFO/DEBUG(75): pid: 190, tid: 198  >>>
system_server <<<
03-16 09:58:04.554: INFO/DEBUG(75): signal 11 (SIGSEGV), code 1
(SEGV_MAPERR), fault addr 0000005c


-- 

2. Nexus S kernel not booting after compile

after compiling the kernel...

at the end I used the command

"fastboot boot boot.img"

and it sits there at the google logo, padlock unlocked bewlow with a
message overlapping it saying "FASTBOOT STATUS - OKAY" and thats it...
nothing happens after that.

If I use "fastboot boot ./kernel ./initramfs.cpio.gz" same thing
happens except the message "FASTBOOT STATUS - OKAY" is not showing...

any suggestions?

the scripts I use are these

#build_kernel
#!/bin/sh

export ARCH=arm
export CROSS_COMPILE=/home/sinatosk/android_manifest/prebuilt/linux-
x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-

cd samsung/

make clean
make -j4

cp arch/arm/boot/zImage ./kernel

cd ..

exit 0

#build_initramfs
#!/bin/sh

cd herring_initramfs/
find | fakeroot cpio -o -H newc | gzip -9 > ../initramfs.cpio.gz
cd ..

#build_boot
#!/bin/sh

./mkbootimg \
--kernel ./kernel \
--ramdisk ./initramfs.cpio.gz \
--base 0x30000000 \
--pagesize 4096 \
-o ./boot.img

thanks

-- 

3. bug or a feature?

4. Creating integer array of resource ids

5. AWT - yes or no??!

6. Tracing Geo Location and saving them into file from start of a cal to end call duration

7. Resolution Problem