Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extremely Slow on 64-bit Ubuntu 13.04 #26

Open
brianoh opened this issue Aug 21, 2013 · 6 comments
Open

Extremely Slow on 64-bit Ubuntu 13.04 #26

brianoh opened this issue Aug 21, 2013 · 6 comments

Comments

@brianoh
Copy link

brianoh commented Aug 21, 2013

I wrote some test software using Dart and sqljocky on Windows 7, and all appeared to be working OK. I then transferred it to Ubuntu Linux 13.04 64bit, and it is taking at least 50-times longer to handle inserts and updates (sole user, small database). The Dart-Editor is 26106. The laptop that I am using for Ubuntu is about twice the speed of the Windows laptop. Dart in general I thought responded very quickly when initializing and starting on Ubuntu. The version of MySql is the one supplied by Ubuntu (5.5.32). I am using v0.5.8 of sqljocky. I have only just set up the laptop to run Ubuntu and Dart Editor. The results that I get are the same within the Editor and from the Command-Line. I'm not sure where to look to attempt to resolve. I presume that you know results from both Linux and Windows for comparison.

@jamesots
Copy link
Collaborator

When I switched from Windows to Linux, MySQL in general became very slow, and it was because of the journalling filesystem. I now have my MySQL data in a different partition with different settings.

Is MySQL access fast when you access it using other programming languages, or is it just sqljocky that is slow?

@brianoh
Copy link
Author

brianoh commented Aug 21, 2013

I don't have anything else available to run. Can you suggest anything? It appears very fast from Mysql Command-Line, but that is only with selects on a small database, so doesn't mean much.

@brianoh
Copy link
Author

brianoh commented Aug 22, 2013

Not sure if you've had a chance to look further at this James. The only additional comments that I can make now that may have some bearing are:

  1. postgresql for Dart (xxgreg) also runs slower on my 64bit ubuntu 13.04 machine, but to nowhere near the same extent. Average time for inserts and updates is around 12 milliseconds compared to around 180 milliseconds for sqljocky. On Windows 7 they take around 2 to 3 milliseconds on my old (around 4+ years) laptop.
  2. I have now also run sqljocky on 32 bit ubuntu 12.10 on my old laptop. The times I get are very slow there also roughly comparable to the 64-bit times of around 180 milliseconds. I also ran postgresql there, and the times for that are comparable to Windows 7 - around 2 to 3 milliseconds for inserts and updates.
  3. Not that it is likely to be relevant, but just in case, I reported a similar problem relating to lib/pq (issue 69) when going the other way - from Linux to Windows. I gave up in the end, but someone eventually found the problem, I think this was the cause that they advised:

"The exact spot of the delay can be found (at least in the Go 1.1 source tree) at src/pkg/os/user/lookup_windows.go, line 18-19:

"name, e := syscall.TranslateAccountName(domainAndUser,
syscall.NameSamCompatible, syscall.NameDisplay, 50)

"If you are not on a domain, this call seems to take about 2.3 seconds to time out. Commenting this line out has the pq go test run in about 0.6 seconds, compared to about 39 seconds with it in."


@brianoh
Copy link
Author

brianoh commented Aug 25, 2013

I have installed my test program on github : https://github.com/brianoh/testmysqldart as follows: README.md
testmy001.dart - Version 0.2.1 25-Aug-2013

Test the Dart MySql driver by James Ots (sqljocky).

sqljocky Link: https://github.com/jamesots/sqljocky

Usage requires a recent release of MySql database >= 5.5
preferably 5.6 and this program uses the MySql driver
(sqljocky) by James (above).

Program creates all tables and data needed and provides
console-input of parameters. It requires a valid MySql
User and Password and Database.

Please read testmy001.dart for documentation if required.

@brianoh
Copy link
Author

brianoh commented Sep 23, 2013

I don't have access to Ubuntu at present, however I have tested Mysql with Win8 64-bit using Golang, and have times of 39ms for Inserts vs about 1ms using PostgreSQL/Golang and about 1ms for PostgreSQL/Dart. I believe that Ubuntu may have released an updated MySql since I ran the test on Ubuntu. The Golang/PostgreSQL test on Win8 is using the same program as the Golang/Mysql test on Win8.

Perhaps it points to a problem with Mysql 64-bit as improbable as that sounds.

On Win8 I'm using Mysql 5.6.13.1.msi installer.

@pulyaevskiy
Copy link

See #67 for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants