Multi Benchmarking Results - Bad SQLite performance

Search This thread

dagrim1

Senior Member
Sep 1, 2008
1,710
369
Does anybody here know how to compile a c file to arm library (.so)?

I can compile sqlite using cygwin on my windows computer but can only seem to get i386 asm code, which is different from ARM code. Have no clue about how to compule for ARM instruction set.

If someone knows how to do this on the source for sqlite then 2 versions can be compiled (sync on and off) which can then be analyzed to find the same patches in our version on the prime.

This is the sqlite source I used, containing the original sqlite.c:
http://www.sqlite.org/sqlite-autoconf-3071201.tar.gz

And the patched file is attached. This is patched to disable sync.
 

Attachments

  • sqlite3_patched.zip
    1.1 MB · Views: 7

Rytkonen

Senior Member
Oct 14, 2010
321
74
I went and asked fellow One X users to post their results here. Hopefully somebody bothers. This web browser performance began to feel again super crappy because I got my SGS3 few days ago.
 

leppie

Senior Member
Dec 21, 2008
566
284
Cape Town
odd... i am getting way way better sqlite performance than any I have seen recently; on locked TFP .21; fresh from factory wipe. On balanced power.

That is odd and disturbing at the same time. One should NOT have to factory reset to get half decent performance.


Does anybody here know how to compile a c file to arm library (.so)?

I can compile sqlite using cygwin on my windows computer but can only seem to get i386 asm code, which is different from ARM code. Have no clue about how to compule for ARM instruction set.

If someone knows how to do this on the source for sqlite then 2 versions can be compiled (sync on and off) which can then be analyzed to find the same patches in our version on the prime.

This is the sqlite source I used, containing the original sqlite.c:
http://www.sqlite.org/sqlite-autoconf-3071201.tar.gz

And the patched file is attached. This is patched to disable sync.

No, it does not work that way. Sorry.
 
Last edited:

Pyr0x64

Senior Member
Mar 7, 2010
699
111
Merseyside
Wow, even my Evo3D beats my Prime :(
I was surprised to see my phone complete the whole RL benchmark before the Prime finished the first test :eek:

My phone gets an overall score of around 49-57s, while my Prime is around 130-139s
 

leppie

Senior Member
Dec 21, 2008
566
284
Cape Town
What do you mean? Am I missing something?

Think it somehow should be possible to compile that code properly...

Somehow possible, but I dont think anyone would be willing to spend 10's of hours for a binary patch. It would be easier to just recompile, but then function addresses will be all messed up. So you would have to explicitly map all of them to specific locations. Then you have to wonder if the version supplied by ASUS does have some hack in it, and which version. What bugs were fixed from upstream source, etc, etc, etc. And then you can test, and hopefully not brick your tablet or someone else's.

Get the point?
 

aleandre1974

Senior Member
Aug 10, 2011
71
10
My S2 running Gingerbread 2.3.6 (stock) gets an overall score of 44 seconds.

Sent from my Transformer Prime TF201 using xda premium
 

Tempie007

Senior Member
Dec 15, 2010
499
72
I did the db and i/o tests of Antutu and the Sqllite test on my prime and my SGS3, the tests itself ran three > times longer on the prime....
There is something seriously wrong with either the memory or the firmware of the prime.....

Prime:
Database i/o: 395
SD Card Write: 5.6 MB/s 56
SD Card Read: 16.5 MB/s 165
SQLLite: 132 seconds

SGS3:
Database i/o: 550
SD Card Write: 28.9 MB/s 150
SD Card Read: 41.2 MB/s 196
SQLLite: 20 seconds

EDIT: Even my desire HD does the sqllite test in 50s...... more than twice as fast....
 
Last edited:
  • Like
Reactions: Bait-Fish

mystril

Senior Member
Jun 26, 2011
50
12
As they say, the Devil is in the details.

Screw the marketing.. Asus Prime = HTC Chacha? *ugh*

I do feel my Prime is way slower than my SGS2 in Installation. Random Freezes. Oddly similar performance in PDF reading despite Tegra 3.
 

Tempie007

Senior Member
Dec 15, 2010
499
72
Does the stock browser also depend on sqlite for caching?

So would any site with lots of little pictures continue to suck even on .28? Like www.toy-wave.com for example?

The browser relies on sdcard write speed since it caches on disk like every browser does. Dont know if sqllite is involved.
It has become clear that the browser wait/lock issues are caused by IO troubles (browser2ram and cf scheduler are workarounds)

The difference on sdcard write speed with other devices is so big it HAS to be resolved by firmware?! Else this is REALLY crappy memory!
 
Last edited:

dagrim1

Senior Member
Sep 1, 2008
1,710
369
Somehow possible, but I dont think anyone would be willing to spend 10's of hours for a binary patch. It would be easier to just recompile, but then function addresses will be all messed up. So you would have to explicitly map all of them to specific locations. Then you have to wonder if the version supplied by ASUS does have some hack in it, and which version. What bugs were fixed from upstream source, etc, etc, etc. And then you can test, and hopefully not brick your tablet or someone else's.

Get the point?

Eh? I provided the source needed to compile the library... Recompile that is. I supplied the patched file as well, that makes it possible to compile 2 libraries, from source.

Using those 2 libraries I can most likely find the locations/code needed to patch in the binary .so file. I already decompiled the .so files and found 2 of the locations, I know the 3rd location but can't make sense of the code. With a patched and unpatched binary from the same source I think I can.

Addresses are different yeah, but the disassembled code isn't. It is VERY easy to compare (believe me, I already did it with the compiled x86 versions of the sqlite binary).

About bricking, I have CWM installed so can always restore. I already copied the sgs3 versions of the libsqlite libraries, it booted fine. Before I copied some wrong versions, didn't boot but the restore fixed it.

I know what I'm doing, I disassembled and messed with machine code before, I know what CAN happen... But I want to find out if this can improve results as I think it can.
 

MaBlo

Senior Member
Dec 21, 2010
601
101
Someone asked for this over at our forum, 39 secs.

Sent from my HTC One X using xda premium
 

Attachments

  • uploadfromtaptalk1338833060929.jpg
    uploadfromtaptalk1338833060929.jpg
    76.2 KB · Views: 230

Top Liked Posts

  • There are no posts matching your filters.
  • 7
    Being quite happy overall with the prime I couldn't help feeling certain things are very slow, mainly IO actions. Restoring titanium backups takes ages for example.

    So I decided to do some extensive benchmarking using the i9100 and TF201 (for now, will add the TF101 later as well) to see how exactly the prime performs. I used the following benchmarks and ran them 3 times each (TF201 in performance mode, CFQ scheduler):

    RL Benchmark - SQLite performnace
    Androbench
    CF-Bench v1.1
    Antutu Benchmark
    Benchmark (from softweg)

    And I'm mostly blown away by the pathetic sqlite performance (and related, the disk performance). See screenshot for a summary (the .xls contains all the results).

    1000 inserts taking 68 secs on the tf201 vs 0.6 secs on the i9100!!!
    drop table taking 2+ secs on the tf201 vs 0.1 on the i9100

    seq. read: ~20mb/s on the TF201 vs 52+ on the i9100
    sqlite (updates and deletes): 18-ish secs on the TF201 vs 6 ish on the i9100.

    Is the disk of the TF201 such utter crap? Seems to be... Or are there other ways of improving this. Any other results confirming this?

    Looking into possibilities of disabling fsync() btw (http://xdaforums.com/showthread.php?t=903507) but nothing really yet.
    5
    Just for the heck of it I semi patched the libsqlite.so file... The 2 places I knew to pathc and left the 3rd one alone.

    As a result, RL Benchmark done in 24 seconds. 1k inserts in about 1 second...

    Basically I have no idea what I'm messing up on my tablet in the meantime, datacorruption and all. But we'll see (cwm backup for the win). I'll let it be to see if I notice any instability/performance difference.

    Perhaps I'll have to do a titanium restore to really test.

    Something is probably wrong since androbench shows insane scores for the SQLite benchmarks. Maybe the changes aren't actually made? We'll see... Anyway, just thought I'd mention.

    Really want to figure out the complete patch...
    5
    I can't be the only one who thinks all of the browser lockups and other strange issues are related to the horrendous NAND performance. I'm reading all of these threads on the next Asus update, and from what I can tell, Asus seems to be focusing more on a band-aid fix to placate the user base, rather than taking care of the root of the problem...assuming the root cause is actually fixable. Since I'm still a believer that this is a problem with drivers/controller rather than the NAND itself, I would think that rectifying this issue should the #1 priority for Asus. After all, this tablet was released months ago, and should never have been released in such a state. And if this problem is actually an issue with cheap/underperforming NAND, than shame on Asus. I may not be a huge fan of Apple gadgets (although my laptop is a Macbook Pro), but they sure as hell know how to keep their customers happy and how to keep them coming back time after time, even when their new product is nothing more than an insignificant upgrade over the old. I am truly at a loss as to why other companies don't get this simple concept that customer satisfaction = more sales, and screwing customers over tends to drive them away. Do they not realize that when we play with a friend's Ipad 2 or 3, we may get just a little disappointed that our quad-core "beast" gets it's rear end handed to it by a 1 year old device with a picture of a bitten apple running half the hardware? I really do hope that Asus comes through with a real fix and not a band-aid, because as of now, the Prime has failed all of my expectations.

    As I posted earlier, my original Evo 4G gets 3x the NAND performance, so I am very confident that this is nothing more than a software issue. Surely Asus is not sourcing 5 year old chips for a $500 flagship tablet, right?

    Just ran SQLite on my Samsung Galaxy S2 (Epic 4G Touch):
    1000 Inserts - 0.645 seconds (about 110 times faster than the Prime)
    Overall - 27.005 seconds (about 4.5 times faster than the Prime)

    The E4GT is tweaked, but the Prime isn't exactly stock either. I always wondered why installing or deleting apps is so much faster on the E4GT, and now I know why.
    4
    K, just been able to compile my own CM9 rom... The tutorial was for a nexus so not completely perfect yet but libsqlite was compiled and results in a ~36.6 sec RL bench...

    Will compile for TF201 if I figure out how (this weekend I guess) and see if I notice any issues (semi patch caused a nr of FC in the end) but hey, at least was able to compile something ;)

    And I'll also apply this one: http://xdaforums.com/showthread.php?t=1670824

    To make sure all is clean n dandy...
    3
    It appears the memory used in some of the 32GB models is exactly the same as use in a Kingston DataTraveller 101 Gen 2 (DT101G2/32GB). This costs around $30 retail.

    Here is pic of a dismantled one:

    attachment.php


    Update:

    Here you can see the flash mem.

    The Chinese message board thread where I deciphered this (you will have to figure out how to register to see the pictures).