Re: Python on FreeBSD is slower than on Linux
On 13/11/2015 6:26 AM, Vladimir Bogrecov wrote: > Hello, > > I'm developing a little project on Python 3.5. The server's operating > system is FreeBSD 10.2. Today I decided to do a little test "just for fun" > and the result has confused me. I ran the following code > > import random > import time > > > def test_sort(size): > sequence = [i for i in range(0, size)] > random.shuffle(sequence) > start = time.time() > ordered_sequence = sorted(sequence) > print(time.time() - start) > > > if __name__ == '__main__': > test_sort(100) > > on FreeBSD 10.2 x64 and on Debian 8 x64. Both computers was the smallest > (5$ per month) virtual machines on the Digital Ocean ( > https://www.digitalocean.com). The average result on the FreeBSD was 1.5 > sec, on the Debian 1.0 sec. Both machines was created specially for test > and had not any customization. Could you help me to understand why python > is so slower on FreeBSD and may be there are some steps I can perform to > speed up the python to work not slower than on Debian. > > I have found in Google the similar question: > https://lists.freebsd.org/pipermail/freebsd-python/2012-June/004306.html so > it has an interest not only for me. > > P.S. I really like FreeBSD and I would be happy to solve this issue. If you > will have an interest to this issue I can provide SSH access for both > machines :) > > Thank You! >From FreeBSD Python's (team) point of view, I can't think of anything obvious off the top of my head that might cause a ~30% performance issue for that workload. Let's get a trace (truss, strace, dtrace) of what's going during the run so we can figure out exactly what's happening and in what context. With respect to the testing environment, certain VPS providers throttle bursts of CPU pretty heavily, so you'll want to account for/isolate that as a potential contributor. Yes both OS's are being run on the same provider, but as Alfred said, one OS may be mitigating/working around certain virtualisation 'issues'. A full trace of what the test case is doing is definitely the next best step I can think of, even before profiling in python, which is probably going to provide insight as well. Personally, I'd love to hear about anything that might result in FreeBSD always topping the charts for Python performance. ./koobs ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
Re: Python on FreeBSD is slower than on Linux
I'm adding Freebsd-virtualization to this thread as both problems point to some possible issue with FreeBSD as a guest. (although a bare metal comparison should likely be done as well). -Alfred On 11/12/15 11:26 AM, Vladimir Bogrecov wrote: Hello, I'm developing a little project on Python 3.5. The server's operating system is FreeBSD 10.2. Today I decided to do a little test "just for fun" and the result has confused me. I ran the following code import random import time def test_sort(size): sequence = [i for i in range(0, size)] random.shuffle(sequence) start = time.time() ordered_sequence = sorted(sequence) print(time.time() - start) if __name__ == '__main__': test_sort(100) on FreeBSD 10.2 x64 and on Debian 8 x64. Both computers was the smallest (5$ per month) virtual machines on the Digital Ocean ( https://www.digitalocean.com). The average result on the FreeBSD was 1.5 sec, on the Debian 1.0 sec. Both machines was created specially for test and had not any customization. Could you help me to understand why python is so slower on FreeBSD and may be there are some steps I can perform to speed up the python to work not slower than on Debian. I have found in Google the similar question: https://lists.freebsd.org/pipermail/freebsd-python/2012-June/004306.html so it has an interest not only for me. P.S. I really like FreeBSD and I would be happy to solve this issue. If you will have an interest to this issue I can provide SSH access for both machines :) Thank You! ___ freebsd-pyt...@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-python To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org" ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"
vm-bhyve port upgrade
Hello, For anyone interested I have submitted a PR to update the version of vm-bhyve in the ports tree. Primarily this fixes the off-putting, but completely benign error printed when users run 'vm init' (the very first thing to run...) I've no idea if I've got the diff format right though. Also adds various small fixes, and the following changes since the last ports version: Command to rename a guest Configuration options for utctime, hostbridge, disk options, debug mode, custom grub commands, virtual random device Snapshot and rollback commands when using ZFS Allows use of custom bridges and/or tap devices in addition to the normal automated networking Ability to specify a custom path for disk devices Guests can now automatically attach correctly to virtual switches if the real interface(s) (and thus the bridge) are using jumbo frames Template options to specify zfs dataset/zvol properties to apply when creating a guest (most useful for zvol volblocksize) New 'info' commands showing detailed guest/switch details including disk & network usage No longer replaces dnsmasq.conf, just provides a sample config for the user to apply if they want dhcp on a nat-enabled virtual switch. Matt (churchers) ___ freebsd-virtualization@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-virtualization To unsubscribe, send any mail to "freebsd-virtualization-unsubscr...@freebsd.org"