Search Results

Search found 309 results on 13 pages for 'igor clark'.

Page 11/13 | < Previous Page | 7 8 9 10 11 12 13  | Next Page >

  • non-blocking socket client connection

    - by Igor
    ALL, I am looking for a simple example of non-blocking socket connection that will run on Windows. I tried to Google, but all samples are either for *nix (POSIX) or blocking sockets on Windows. Looking thru msdn I see that it is easy to make a socket non-blocking and issue a connect(), but then you need some preparation in order to put the socket back. So, all in all I need something on a non-blocking socket that will connect and then put it back to be blocking. The read and write operation should be performed on the blocking socket. The reason for a non-blocking socket is that I need a connection timeout and there is no other way than non-blocking socket. Or is there? Thank you.

    Read the article

  • Hide Segemented Control on NavBar, then add Title

    - by Jordan Clark
    Basically I have a Segmented Controller on my NavBar right in the middle. What I want to be able to do is hide the Segmented Controller and add a title to the navigation bar. But with my code, the segmented controller is being hidden, but the title will not add, thus leaving a blank NavBar. This is my simple code in .h: IBOutlet UISegmentedControl *toggleDay; IBOutlet UINavigationBar *navBar; And this is my code in my .m: toggleDay.hidden = YES; navBar.topItem.title = @"Title"; Any help would be great thanks!

    Read the article

  • HTML5 offline cache google font api

    - by Bala Clark
    I'm trying to create an offline HTML5 test application, and am playing with the new google fonts api at the same time. Does anyone have any ideas how to cache the remote fonts? Simply putting the api call in the cache manifest doesn't work, I assume this is because the api actually loads other files (ttf, eot, etc). Any ideas if using the font api offline would be possible? For reference this is the call I am making: http://fonts.googleapis.com/css?family=IM+Fell+English|Molengo|Reenie+Beanie

    Read the article

  • How to separate database entries and display them as individual records using PHP?

    - by Clark
    I used to have database entries separated by ampersands (&), but this was causing certain search issues so I decided to encapsulate my entries on both sides by $ and & symbols like: $this& But I am having trouble displaying all the entries of a cell as individual records. Before I used: $unsplitItems = $row['files']; $files = explode("@", $unsplitItems); foreach ($files as $file) { if(strlen($file)) { echo "<li>$file</li>"; } } Any idea how I can split my records and display all the items in the array as individual entries?

    Read the article

  • array loop not working correctly? c++

    - by igor
    Trying to count how many elements within the array are not equal to 0, is something set up wrong? I'd like to check all values in the array (it's a sudoku board) and then when all elements are "full" I need to return true. Is something off? bool boardFull(const Square board[BOARD_SIZE][BOARD_SIZE]) { int totalCount=0; for (int index1 = 0; index1 < BOARD_SIZE; index1++) for (int index2 = 0; index2 < BOARD_SIZE; index2++){ if(board[index1][index2].number!=0) totalCount++; } if(totalCount=81) return true; else return false;

    Read the article

  • Saving state between actions.

    - by Igor
    Hi all! I'd like to ask for a solution. For example we have a page. And I have a link to a another action from this page. I want to have an ability to save the values of entered data on the page. For instance I go to another page enter data and go back. Like the wizard. But the problem is that we can come to the action from different pages. And it need to save several data types. Is it understand? Any suggestions? I'd like to have common solution....

    Read the article

  • Why isn't this simple MySQL statement working?

    - by Clark
    I am trying to match a user inputted search term against two tables: posts and galleries. The problem is the union all clause isn't working. Is there something wrong with my code? $query = mysql_query(" SELECT * FROM posts WHERE title LIKE '%$searchTerm%' OR author LIKE '%$searchTerm%' OR location LIKE '%$searchTerm%' OR excerpt LIKE '%$searchTerm%' OR content LIKE '%$searchTerm%' UNION ALL SELECT * FROM galleries WHERE title LIKE '%$searchTerm%' ");

    Read the article

  • Errors not printing correctly..Is this logic flow correct? c++

    - by igor
    Example user input: PA1 9 //correct PJ1 9 //wrong, error printed "Invalid row" because it is not between A and I PA11 9 //wrong, error printer "Invalid column" because it is not between 1 and 9. The problem I am having is that it should clear the remaining input and then ask for the user to enter the "move" again, and it is not. Where did I go wrong? I've been at it for a while and still got no progress.. void clearInput() { cin.clear(); } bool getCoords(int & x, int & y) { char row; while(true){ cin>>row>>y; row=toupper(row); if(/*(id=='P' || id=='p' || id=='D' || id=='d') && */row>='A' && row<='I' && isalpha(row) && y>=1 && y<=9){ x=row-'A'; y=y-1; return true; } else if(!(y>=1 && y<=9)){ cout<<"Invalid column\n"<< endl << endl; cout<<y; clearInput(); cout<<y; //return false; } else{ cout<<"Invalid row\n"<< endl << endl; clearInput(); //cout<<x<<y; //return false; } } }

    Read the article

  • How to seperate database entries and display them as individual records using PHP?

    - by Clark
    I used to have database entries separated by ampersands (&), but this was causing certain search issues so I decided to encapsulate my entries on both sides by $ and & symbols like: $this& But I am having trouble displaying all the entries of a cell as indiivdual records. Before I used: $unsplitItems = $row['files']; $files = explode("@", $unsplitItems); foreach ($files as $file) { if(strlen($file)) { echo "<li>$file</li>"; } } Any idea how I can split my records and display all the items in the array as individual entries?

    Read the article

  • Silverlight Cream for November 13, 2011 -- #1166

    - by Dave Campbell
    In this Issue: Pontus Wittenmark, Jeff Blankenburg(-2-), Colin Eberhardt, Charles Petzold, Dhananjay Kumar, Igor, Beth Massi, Kunal Chowdhury(-2-), Shawn Wildermuth, XAMLNinja, and Peter Kuhn(-2-). Above the Fold: Silverlight: "Silverlight Page Navigation Framework - Learn about UriMapper" Kunal Chowdhury WP7: "31 Days of Mango" Jeff Blankenburg WinRT/Metro/W8: "An Introduction to Semantic Zoom in Windows 8 Metro" Colin Eberhardt LightSwitch: "Common Validation Rules in LightSwitch Business Applications" Beth Massi Shoutouts: Michael Palermo's latest Desert Mountain Developers is up Michael Washington's latest Visual Studio #LightSwitch Daily is up From SilverlightCream.com: 10 tips about porting Silverlight apps to WinRT/Metro style apps (Part 1) Pontus Wittenmark spent some time porting his Silverlight game to WinRT and says it was easier than expected. He has posted 10 tips for porting... and promises more 31 Days of Mango Looks like Jeff Blankenburg started another 31 days series... this one on Mango dev... and looks like I'm late to the party, but that's ok, gives me more stuff to blog about... this time you can get the posts by email, and he has a hashtag for discussion too 31 Days of Mango | Day #1: The New Windows Phone Emulator Tools Day 1 of Jeff Blankenburg's journey is this post on what's new in the emulator tools. An Introduction to Semantic Zoom in Windows 8 Metro This is Colin Eberhardt's latest ... getting familiar with semantic zoom oin Metro by creating a WP7-stylke jumplist experience.... check out the video on his blogpost for a better idea of what he's up to .NET Streams and Windows 8 IStreams In his first real post on his new series writing an EPUB viewer for W8, Charles Petzold described using IInputStream to get the contents of a disk file... and source for the project in progress Video on How to work with Page Navigation and Back Button in Windows Phone 7 Dhananjay Kumar has a video tutorial up on Page Navigation and Back Button usage in WP7 Screen capture to media library instead of isolated storage Igor discusses a class that lets you save screen captures for use in your application and also saving them to the media library on the phone Common Validation Rules in LightSwitch Business Applications Beth Massi's latest is this LightSwitch post on Validation rules... showing how to define declarative rules and also write custom validation code. Silverlight Page Navigation Framework - Learn about UriMapper Kunal Chowdhury continues his Page Navigation discussion with this post on the UriMapper, and how to hide the actual URL of the page you're navigating to How to use PlaySoundAction Behavior in WP7 Application? Kunal Chowdhury also has this post up on using the PlaySoundAction Behavior in WP7 ... nice tutorial on using Blend to get the job done What Win8 Should Learn from Windows Phone After spending time with Windows 8, Shawn Wildermuth has this post up about features from WP7 that should be brought over to Windows 8, and finishes with features that WP8 (?) could learn from Win8 too WP7Contrib – FindaPad and the fastest list in the west XAMLNinja discusses the WP7 App FindaPad which spawned the creation of WP7Contrib and uses the app to describe some nuances that may not be readily obvious. Windows Phone 7: The kind of bug you don't want to discover Peter Kuhn discusses a problem he came across while programming WP7, interestingly enough, only in the emulator, and has to do with a Uint64 cast. He does offer a workaround. Announcing: Your Last About Dialog (YLAD) Peter Kuhn also has this post up that's a take-off on a post by Jeff Wilcox about a generic About Dialog. Peter has some great additions.. and he's right... it may be your last About Dialog... get it via NuGet, too! Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Using sed, how can I remove lines with salaries ending 500?

    - by Steve
    Using sed, how can I remove lines with salaries ending 500? Input file: Steve Blenheim:238-923-7366:95 Latham Lane, Easton, PA 83755:11/12/56:20300 Betty Boop:245-836-8357:635 Cutesy Lane, Hollywood, CA 91464:6/23/23:14500 Igor Chevsky:385-375-8395:3567 Populus Place, Caldwell, NJ 23875:6/18/68:23400 Norma Corder:397-857-2735:74 Pine Street, Dearborn, MI 23874:3/28/45:245500 Jennifer Cowan:548-834-2348:583 Laurel Ave., Kingsville, TX 83745:10/1/35:58900

    Read the article

  • Using sed, how can I delete all blank lines?

    - by Steve
    Using sed, how can I delete all blank lines? Input file: Steve Blenheim:238-923-7366:95 Latham Lane, Easton, PA 83755:11/12/56:20300 Betty Boop:245-836-8357:635 Cutesy Lane, Hollywood, CA 91464:6/23/23:14500 Igor Chevsky:385-375-8395:3567 Populus Place, Caldwell, NJ 23875:6/18/68:23400 Norma Corder:397-857-2735:74 Pine Street, Dearborn, MI 23874:3/28/45:245500 Jennifer Cowan:548-834-2348:583 Laurel Ave., Kingsville, TX 83745:10/1/35:58900

    Read the article

  • need to print 5 column list in alpha order, vertically

    - by Brad
    Have a webpage that will be viewed by mainly IE users, so CSS3 is out of the question. I want it to list like: A D G B E H C F I Here is the function that currently lists like: A B C D E F G H I function listPhoneExtensions($group,$group_title) { $adldap = new adLDAP(); $group_membership = $adldap->group_members(strtoupper($group),FALSE); sort($group_membership); print " <a name=\"".strtolower($group_title)."\"></a> <h2>".$group_title."</h2> <ul class=\"phone-extensions\">"; foreach ($group_membership as $i => $username) { $userinfo = $adldap->user_info($username, array("givenname","sn","telephonenumber")); $displayname = "<span class=\"name\">".substr($userinfo[0]["sn"][0],0,9).", ".substr($userinfo[0]["givenname"][0],0,9)."</span><span class=\"ext\">".$userinfo[0]["telephonenumber"][0]."</span>"; if($userinfo[0]["sn"][0] != "" && $userinfo[0]["givenname"][0] != "" && $userinfo[0]["telephonenumber"][0] != "") { print "<li>".$displayname."</li>"; } } print "</ul><p class=\"clear-both\"><a href=\"#top\" class=\"link-to-top\">&uarr; top</a></p>"; } Example rendered html: <ul class="phone-extensions"> <li><span class="name">Barry Bonds</span><span class="ext">8281</span></li> <li><span class="name">Gerald Clark</span><span class="ext">8211</span></li> <li><span class="name">Juan Dixon</span><span class="ext">8282</span></li> <li><span class="name">Omar Ebbs</span><span class="ext">8252</span></li> <li><span class="name">Freddie Flank</span><span class="ext">2281</span></li> <li><span class="name">Jerry Gilmore</span><span class="ext">4231</span></li> <li><span class="name">Kim Moore</span><span class="ext">5767</span></li> <li><span class="name">Barry Bonds</span><span class="ext">8281</span></li> <li><span class="name">Gerald Clark</span><span class="ext">8211</span></li> <li><span class="name">Juan Dixon</span><span class="ext">8282</span></li> <li><span class="name">Omar Ebbs</span><span class="ext">8252</span></li> <li><span class="name">Freddie Flank</span><span class="ext">2281</span></li> <li><span class="name">Jerry Gilmore</span><span class="ext">4231</span></li> <li><span class="name">Kim Moore</span><span class="ext">5767</span></li> <li><span class="name">Barry Bonds</span><span class="ext">8281</span></li> <li><span class="name">Gerald Clark</span><span class="ext">8211</span></li> <li><span class="name">Juan Dixon</span><span class="ext">8282</span></li> <li><span class="name">Omar Ebbs</span><span class="ext">8252</span></li> <li><span class="name">Freddie Flank</span><span class="ext">2281</span></li> <li><span class="name">Jerry Gilmore</span><span class="ext">4231</span></li> <li><span class="name">Kim Moore</span><span class="ext">5767</span></li> </ul> Any help is appreciated to getting it to list alpha vertically.

    Read the article

  • Google I/O 2010 - Ignite Google I/O

    Google I/O 2010 - Ignite Google I/O Google I/O 2010 - Ignite Google I/O Tech Talks Brady Forrest, Krissy Clark, Ben Huh, Matt Harding, Clay Johnson, Bradley Vickers, Aaron Koblin, Michael Van Riper, Anne Veling, James Young Ignite captures the best of geek culture in a series of five-minute speed presentations. Each speaker gets 20 slides that auto-advance after 15 seconds. Check out last year's Ignite Google I/O. For all I/O 2010 sessions, please go to code.google.com/events/io/2010/sessions.html From: GoogleDevelopers Views: 206 3 ratings Time: 58:30 More in Science & Technology

    Read the article

  • Shaping the Future of Power

    - by caroline.yu
    In an energy marketplace that continues to evolve, gain insight into how utility executives increasingly confront the challenges of preparing their workers, regulators and customers for a period of volatility and promise. This free on-demand Web cast, sponsored and underwritten by Oracle Utilities, will provide you with an executive-level view of what it means and takes to be a utility leader. By viewing this Web cast, you will hear: NRG's CEO David Crane weighing in on next-gen nuclear, generation portfolio diversity, and what it's like to live through (and thrive in) a hostile takeover attempt EPRI's Clark Gellings, the father of demand side management, outlining the coming trends marrying technology with customer energy consumption patterns CEO Ralph Izzo discussing PSEG's low-carbon emissions strategy, commitment to solar power development, and pursuit of reliability through infrastructure investment. To view this Web cast, please follow this link.

    Read the article

  • Remote Development With Solaris Studio

    - by rchrd
    A new technical article has been published on OTN: How to Develop Code from a Remote Desktop with Oracle Solaris Studio by Igor Nikiforov This article describes the remote desktop feature of the Oracle Solaris Studio IDE, and how to use it to compile, run, debug, and profile your code running on remote servers. Published May 2012 Introducing the IDE Desktop Distribution Determining Whether You Need the Desktop Distribution Creating the Desktop Distribution Using the Desktop Distribution See Also About the Author Introducing the IDE Desktop Distribution Sun Studio 12 Update 1 introduced a unique remote development feature that allows you to run just one instance of the IDE while working with multiple servers and platforms. For example, you could run the IDE on an x86-based laptop or desktop running Oracle Linux, and use a SPARC-based server running Oracle Solaris 10 to compile, run, debug, and profile your code. The IDE works seamlessly just as if you had the Oracle Solaris operating system on your laptop or desktop. ....read more

    Read the article

  • Sonatype soumet le projet Open Source Tycho à la communauté Eclipse, la version 1.0 attendue pour Q3

    Bonjour, Sonatype a finalisé la proposition du projet Tycho en tant que projet Eclipse Le but de Tycho est de s'appuyer sur l'outil de build Maven pour construire des plugins Eclipse, features, update sites, applications RCP, et bundles OSGi. concrètement, Tycho correspond à un ensemble de plugins Maven. La liste des premiers committers serait à 100% Sonatype :Igor Fedorenko (project lead) Benjamin Bentmann Marvin Froeder Jason van Zyl Tycho se positionne sur le créneau des solutions Eclipse Buckminster, B3, PDE Build, et Athena. Certains d'entre vous se sont déjà intéressé à Tycho ? Que pensez...

    Read the article

  • Encrypt folders out of Home

    - by igi
    Is there a way to encrypt a folder, which is not in /home but even in a different partition, so only my user can access/read contained files? Alternatively, I would like to understand if it is possible to turn a complete ext4 partition into an encrypted volume, which would be mounted at user login. If possible, I would like to make the change without reinstalling Ubuntu. My PC has (mount output): /dev/sda1 on / type ext4 (rw,errors=remount-ro) /dev/sda3 on /home type ext4 (rw) /dev/sda4 on /home/igor/Personale type ext4 (rw) sda4 is the partition containing folders I would like to protect. Thanks!

    Read the article

  • A little SQL tip for C# developers

    - by MikeParks
    The other day at work I came across a handy little block of SQL code from Jeremiah Clark's blog. It's pretty simple logic but through the mind of a C# developer making some quick DB updates, seems to me that it's more likely to end up writing out the code in Solution 1 instead of Solution 2 below to solve the problem. Basically, I needed to check and see if a specific record existed in Table1. If it does exist, then update that record, otherwise insert a new record into Table1. Solution 1: IF EXISTS (SELECT * FROM Table1 WHERE Column1='SomeValue')     UPDATE Table1 SET (...) WHERE Column1='SomeValue' ELSE     INSERT INTO Table1 VALUES (...) Solution 2: UPDATE Table1 SET (...) WHERE Column1='SomeValue' IF @@ROWCOUNT=0     INSERT INTO Table1 VALUES (...)         As Jeremiah explains, they both accomplish the same thing but from a performance standpoint, Solution 2 is the better way to go (saved table/index scan). Just wanted to throw this small tip out there. Thanks! - Mike

    Read the article

  • Error running phusion passenger in standalone mode

    - by msidell
    I'm trying to run standalone phusion passenger so that I can run different ruby rvm configurations on the same host. I already have ruby and passenger running fine on this host. I am following the instructions here. When I run standalone passenger the first time, it appears to successfully install nginx. But then when it tries to run, I get this error: [root@clark directra]# passenger start -a 127.0.0.1 -p 3001 -d --user dweb *** ERROR *** Could not start Passenger Nginx core: nginx: [alert] could not open error log file: open() "/tmp/passenger-standalone.16757/logs/error.log" failed (2: No such file or directory) nginx: [alert] Unable to start the Phusion Passenger watchdog (/var/lib/passenger-standalone/3.0.11-x86-ruby1.9.3-linux-gcc4.1.2-1002/support/ agents/PassengerWatchdog): Permission denied (13) (13: Permission denied) Stopping web server... done FWIW, /tmp is writeable. Any idea what's wrong?

    Read the article

  • Le mystère du "Framework Duqu" est résolu, le malware aurait été écrit avec une extension C orientée objet créée sur mesure

    Le mystère du "Framework Duqu" est résolu Le malware aurait été écrit avec une extension C orientée objet créée sur mesure Mise à Jour du 20/03/2012 par MiaowZedong Les chercheurs de Kaspersky ont annoncé hier (19/03/2012) qu'ils avaient résolu « avec un niveau de certitude très élevé » le mystère Duqu. L'expert Igor Soumenkov commence par remercier les nombreux développeurs qui ont suggéré des pistes d'investigation : il annonce avoir reçu plus de 200 commentaires sur son blog et 60+ emails. Il dit donc « un grand merci » à tous ces participants. Parmi les différentes suggestions, le LISP, le Forth, Google Go, l'Erlang, Delphi, les com...

    Read the article

  • worth learning c# before Visual Web Developer 2010 [closed]

    - by Jamie Knott
    Ive been trying to learn asp.net from reading "beginning asp.net 4 with c#" and been finding it hard to get a solid grasp on the code involved. I plan to go to tafe sometime next year to get my diploma but want to start myself. instead of learning asp.net as a whole and all the languages involved such as c#, html css and javascript etc etc. I'm starting to think a solid understanding of at lest one of these might be beneficial I have "Beginning C# Object-Oriented Programming - Clark - Apress, is it worth learning about the languages before I go head first into a ide?.

    Read the article

  • FreeBSD performance tuning. Sysctls, loader.conf, kernel.

    - by SaveTheRbtz
    I wanted to share knowledge of tuning FreeBSD via sysctls, so i'm posting them with comments. Based on Igor Sysoev (author of nginx) presentation about FreeBSD tuning up to 100,000-200,000 active connections. Sysctls are for 7.x FreeBSD. Since 7.2 amd64 some of them are tuned well by default. Prior 7.0 some of them are boot only (set via /boot/loader.conf) or does not exist at all. Highload web server sysctls: # Max. backlog size kern.ipc.somaxconn=4096 # Shared memory // 7.2+ can use shared memory > 2Gb kern.ipc.shmmax=2147483648 # Sockets kern.ipc.maxsockets=204800 # Do not use lager sockbufs on 8.0 # ( http://old.nabble.com/Significant-performance-regression-for-increased-maxsockbuf-on-8.0-RELEASE-tt26745981.html#a26745981 ) kern.ipc.maxsockbuf=262144 # Recive clusters (on amd64 7.2+ 65k is default) # For such high value vm.kmem_size must be increased to 3G #kern.ipc.nmbclusters=229376 # Jumbo pagesize(4k/8k) clusters # Used as general packet storage for jumbo frames # can be monitored via `netstat -m` #kern.ipc.nmbjumbop=192000 # Jumbo 9k/16k clusters # If you are using them #kern.ipc.nmbjumbo9=24000 #kern.ipc.nmbjumbo16=10240 # Every socket is a file, so increase them kern.maxfiles=204800 kern.maxfilesperproc=200000 kern.maxvnodes=200000 # Turn off receive autotuning #net.inet.tcp.recvbuf_auto=0 # Small receive space, only usable on http-server, on file server this # should be increased to 65535 or even more #net.inet.tcp.recvspace=8192 # Small send space is useful for http servers that serve small files # Autotuned since 7.x net.inet.tcp.sendspace=16384 # This should be enabled if you going to use big spaces (>64k) #net.inet.tcp.rfc1323=1 # Turn this off on highspeed, lossless connections (LAN 1Gbit+) #net.inet.tcp.delayed_ack=0 # This feature is useful if you are serving data over modems, Gigabit Ethernet, # or even high speed WAN links (or any other link with a high bandwidth delay product), # especially if you are also using window scaling or have configured a large send window. # You can try setting it to 0 on fileserver with 1GBit+ interfaces # Automatically disables on small RTT ( http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet/tcp_subr.c?#rev1.237 ) #net.inet.tcp.inflight.enable=0 # Disable randomizing of ports to avoid false RST # Before usage check SA here www.bsdcan.org/2006/papers/ImprovingTCPIP.pdf # (it's also says that port randomization auto-disables at some conn.rates, but I didn't tested it thou) #net.inet.ip.portrange.randomized=0 # Increase portrange # For outgoing connections only. Good for seed-boxes and ftp servers. net.inet.ip.portrange.first=1024 net.inet.ip.portrange.last=65535 # Security net.inet.ip.redirect=0 net.inet.ip.sourceroute=0 net.inet.ip.accept_sourceroute=0 net.inet.icmp.maskrepl=0 net.inet.icmp.log_redirect=0 net.inet.icmp.drop_redirect=1 net.inet.tcp.drop_synfin=1 # Security net.inet.udp.blackhole=1 net.inet.tcp.blackhole=2 # Increases default TTL, sometimes useful # Default is 64 net.inet.ip.ttl=128 # Lessen max segment life to conserve resources # ACK waiting time in miliseconds (default: 30000 from RFC) net.inet.tcp.msl=5000 # Max bumber of timewait sockets net.inet.tcp.maxtcptw=40960 # Don't use tw on local connections # As of 15 Apr 2009. Igor Sysoev says that nolocaltimewait has some buggy realization. # So disable it or now till get fixed #net.inet.tcp.nolocaltimewait=1 # FIN_WAIT_2 state fast recycle net.inet.tcp.fast_finwait2_recycle=1 # Time before tcp keepalive probe is sent # default is 2 hours (7200000) #net.inet.tcp.keepidle=60000 # Should be increased until net.inet.ip.intr_queue_drops is zero net.inet.ip.intr_queue_maxlen=4096 # Interrupt handling via multiple CPU, but with context switch. # You can play with it. Default is 1; #net.isr.direct=0 # This is for routers only #net.inet.ip.forwarding=1 #net.inet.ip.fastforwarding=1 # This speed ups dummynet when channel isn't saturated net.inet.ip.dummynet.io_fast=1 # Increase dummynet(4) hash #net.inet.ip.dummynet.hash_size=2048 #net.inet.ip.dummynet.max_chain_len # Should be increased when you have A LOT of files on server # (Increase until vfs.ufs.dirhash_mem becames lower) vfs.ufs.dirhash_maxmem=67108864 # Explicit Congestion Notification (see http://en.wikipedia.org/wiki/Explicit_Congestion_Notification) net.inet.tcp.ecn.enable=1 # Flowtable - flow caching mechanism # Useful for routers #net.inet.flowtable.enable=1 #net.inet.flowtable.nmbflows=65535 # Extreme polling tuning #kern.polling.burst_max=1000 #kern.polling.each_burst=1000 #kern.polling.reg_frac=100 #kern.polling.user_frac=1 #kern.polling.idle_poll=0 # IPFW dynamic rules and timeouts tuning # Increase dyn_buckets till net.inet.ip.fw.curr_dyn_buckets is lower net.inet.ip.fw.dyn_buckets=65536 net.inet.ip.fw.dyn_max=65536 net.inet.ip.fw.dyn_ack_lifetime=120 net.inet.ip.fw.dyn_syn_lifetime=10 net.inet.ip.fw.dyn_fin_lifetime=2 net.inet.ip.fw.dyn_short_lifetime=10 # Make packets pass firewall only once when using dummynet # i.e. packets going thru pipe are passing out from firewall with accept #net.inet.ip.fw.one_pass=1 # shm_use_phys Wires all shared pages, making them unswappable # Use this to lessen Virtual Memory Manager's work when using Shared Mem. # Useful for databases #kern.ipc.shm_use_phys=1 /boot/loader.conf: # Accept filters for data, http and DNS requests # Usefull when your software uses select() instead of kevent/kqueue or when you under DDoS # DNS accf available on 8.0+ accf_data_load="YES" accf_http_load="YES" accf_dns_load="YES" # Async IO system calls aio_load="YES" # Adds NCQ support in FreeBSD # WARNING! all ad[0-9]+ devices will be renamed to ada[0-9]+ # 8.0+ only #ahci_load= #siis_load= # Increase kernel memory size to 3G. # # Use ONLY if you have KVA_PAGES in kernel configuration, and you have more than 3G RAM # Otherwise panic will happen on next reboot! # # It's required for high buffer sizes: kern.ipc.nmbjumbop, kern.ipc.nmbclusters, etc # Useful on highload stateful firewalls, proxies or ZFS fileservers # (FreeBSD 7.2+ amd64 users: Check that current value is lower!) #vm.kmem_size="3G" # Older versions of FreeBSD can't tune maxfiles on the fly #kern.maxfiles="200000" # Useful for databases # Sets maximum data size to 1G # (FreeBSD 7.2+ amd64 users: Check that current value is lower!) #kern.maxdsiz="1G" # Maximum buffer size(vfs.maxbufspace) # You can check current one via vfs.bufspace # Should be lowered/upped depending on server's load-type # Usually decreased to preserve kmem # (default is 200M) #kern.maxbcache="512M" # Sendfile buffers # For i386 only #kern.ipc.nsfbufs=10240 # syncache Hash table tuning net.inet.tcp.syncache.hashsize=1024 net.inet.tcp.syncache.bucketlimit=100 # Incresed hostcache net.inet.tcp.hostcache.hashsize="16384" net.inet.tcp.hostcache.bucketlimit="100" # TCP control-block Hash table tuning net.inet.tcp.tcbhashsize=4096 # Enable superpages, for 7.2+ only # Also read http://lists.freebsd.org/pipermail/freebsd-hackers/2009-November/030094.html vm.pmap.pg_ps_enabled=1 # Usefull if you are using Intel-Gigabit NIC #hw.em.rxd=4096 #hw.em.txd=4096 #hw.em.rx_process_limit="-1" # Also if you have ALOT interrupts on NIC - play with following parameters # NOTE: You should set them for every NIC #dev.em.0.rx_int_delay: 250 #dev.em.0.tx_int_delay: 250 #dev.em.0.rx_abs_int_delay: 250 #dev.em.0.tx_abs_int_delay: 250 # There is also multithreaded version of em drivers can be found here: # http://people.yandex-team.ru/~wawa/ # # for additional em monitoring and statistics use # `sysctl dev.em.0.stats=1 ; dmesg` # #Same tunings for igb #hw.igb.rxd=4096 #hw.igb.txd=4096 #hw.igb.rx_process_limit=100 # Some useful netisr tunables. See sysctl net.isr #net.isr.defaultqlimit=4096 #net.isr.maxqlimit: 10240 # Bind netisr threads to CPUs #net.isr.bindthreads=1 # Nicer boot logo =) loader_logo="beastie" And finally here is my additions to GENERIC kernel # Just some of them, see also # cat /sys/{i386,amd64,}/conf/NOTES # This one useful only on i386 #options KVA_PAGES=512 # You can play with HZ in environments with high interrupt rate (default is 1000) # 100 is for my notebook to prolong it's battery life #options HZ=100 # Polling is goot on network loads with high packet rates and low-end NICs # NB! Do not enable it if you want more than one netisr thread #options DEVICE_POLLING # Eliminate datacopy on socket read-write # To take advantage with zero copy sockets you should have an MTU of 8K(amd64) # (4k for i386). This req. is only for receiving data. # Read more in man zero_copy_sockets #options ZERO_COPY_SOCKETS # Support TCP sign. Used for IPSec options TCP_SIGNATURE options IPSEC # This ones can be loaded as modules. They described in loader.conf section #options ACCEPT_FILTER_DATA #options ACCEPT_FILTER_HTTP # Adding ipfw, also can be loaded as modules options IPFIREWALL options IPFIREWALL_VERBOSE options IPFIREWALL_VERBOSE_LIMIT=10 options IPFIREWALL_DEFAULT_TO_ACCEPT options IPFIREWALL_FORWARD # Adding kernel NAT options IPFIREWALL_NAT options LIBALIAS # Traffic shaping options DUMMYNET # Divert, i.e. for userspace NAT options IPDIVERT # This is for OpenBSD's pf firewall device pf device pflog # pf's QoS - ALTQ options ALTQ options ALTQ_CBQ # Class Bases Queuing (CBQ) options ALTQ_RED # Random Early Detection (RED) options ALTQ_RIO # RED In/Out options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC) options ALTQ_PRIQ # Priority Queuing (PRIQ) options ALTQ_NOPCC # Required for SMP build # Pretty console # Manual can be found here http://forums.freebsd.org/showthread.php?t=6134 #options VESA #options SC_PIXEL_MODE # Disable reboot on Ctrl Alt Del #options SC_DISABLE_REBOOT # Change normal|kernel messages color options SC_NORM_ATTR=(FG_GREEN|BG_BLACK) options SC_KERNEL_CONS_ATTR=(FG_YELLOW|BG_BLACK) # More scroll space options SC_HISTORY_SIZE=8192 # Adding hardware crypto device device crypto device cryptodev # Useful network interfaces device vlan device tap #Virtual Ethernet driver device gre #IP over IP tunneling device if_bridge #Bridge interface device pfsync #synchronization interface for PF device carp #Common Address Redundancy Protocol device enc #IPsec interface device lagg #Link aggregation interface device stf #IPv4-IPv6 port # Also for my notebook, but may be used with Opteron #device amdtemp # Support for ECMP. More than one route for destination # Works even with default route so one can use it as LB for two ISP # For now code is unstable and panics (panic: rtfree 2) on route deletions. #options RADIX_MPATH # Multicast routing #options MROUTING #options PIM # DTrace options KDTRACE_HOOKS # all architectures - enable general DTrace hooks options DDB_CTF # all architectures - kernel ELF linker loads CTF data #options KDTRACE_FRAME # amd64-only # Adaptive spining in lockmgr (8.x+) # See http://www.mail-archive.com/[email protected]/msg10782.html options ADAPTIVE_LOCKMGRS # UTF-8 in console (9.x+) #options TEKEN_UTF8 #options TEKEN_XTERM # NCQ support # WARNING! all ad[0-9]+ devices will be renamed to ada[0-9]+ #options ATA_CAM # FreeBSD 9+ # Deadlock resolver thread # For additional information see http://www.mail-archive.com/[email protected]/msg18124.html #options DEADLKRES PS. Also most of FreeBSD's limits can be monitored by # vmstat -z and # limits PPS. variety of network counters can be monitored via # netstat -s In FreeBSD-9 netstat's -Q option appeared, try following command to display netisr stats # netstat -Q PPPS. also see # man 7 tuning PPPPS. I wanted to thank FreeBSD community, especially author of nginx - Igor Sysoev, nginx-ru@ and FreeBSD-performance@ mailing lists for providing useful information about FreeBSD tuning. So here is the question: What tunings are you using on yours FreeBSD servers? You can also post your /etc/sysctl.conf, /boot/loader.conf, kernel options, etc with description of its' meaning (do not copy-paste from sysctl -d). Don't forget to specify server type (web, smb, gateway, etc) Let's share experience!

    Read the article

< Previous Page | 7 8 9 10 11 12 13  | Next Page >