{"id":512,"date":"2016-06-24T11:40:10","date_gmt":"2016-06-24T08:40:10","guid":{"rendered":"http:\/\/www.bilisimonline.net\/?p=512"},"modified":"2017-02-16T11:02:23","modified_gmt":"2017-02-16T08:02:23","slug":"oracle-solaris-1011-how-to-set-limit-on-the-maximum-number-of-open-files-per-process","status":"publish","type":"post","link":"http:\/\/www.bilisimonline.net\/index.php\/2016\/06\/24\/oracle-solaris-1011-how-to-set-limit-on-the-maximum-number-of-open-files-per-process\/","title":{"rendered":"Oracle Solaris 10\/11: How to set limit on the maximum number of open files per process"},"content":{"rendered":"<p align=\"JUSTIFY\"><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">\u0130\u015flem ba\u015f\u0131na a\u00e7\u0131k dosyalar\u0131n maksimum limitleri hard limit ve soft limit de\u011ferleri ile s\u0131n\u0131rland\u0131r\u0131labilmektedir. Hard limit(\/etc\/system rlim_fd_max parametresi, process.max-file-descriptor ) sistem y\u00f6neticisi taraf\u0131ndan ayarlan\u0131r, herhangi bir kullan\u0131c\u0131 taraf\u0131ndan de\u011fer azalt\u0131labilir ama art\u0131r\u0131lamaz. Soft limit (\/etc\/system rlim_fd_cur parametresi, process.max-file-descriptor) ise herhangi bir kullan\u0131c\u0131 taraf\u0131ndan ayarlanabilir, hard limit de\u011ferininin \u00fczerine \u00e7\u0131kabilir. <\/span><\/span><\/p>\n<p align=\"JUSTIFY\"><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Solaris 10 ve 11&#8217;de Hard limit ve soft limit ayarlar\u0131 i\u00e7in \u00e7e\u015fitli y\u00f6ntemler mevcut olup bizde bu y\u00f6ntemlerden bahsedece\u011fiz.<\/span><\/span><!--more--><\/p>\n<p align=\"JUSTIFY\"><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\"><b>\/etc\/system dosyas\u0131nda rlim_fd_max parametresi:<\/b> \/etc\/system dosyas\u0131 edit edilir, \u201crlim_fd_max = 65536\u201d de\u011feri girilir 65536 varsay\u0131lan de\u011ferdir. Ayr\u0131ca farkl\u0131 bir de\u011fer girilebilir. \u0130\u015fletim sistemini yeniden ba\u015flatman\u0131z gerekmektedir.<\/span><\/span><\/p>\n<p align=\"JUSTIFY\"><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\"><b>Kaynak kontrol\u00fc process.max-file-descriptor<\/b>: Sistemi kapatmadan ayar yapabildi\u011fimiz y\u00f6ntemdir. \u0130\u015flemler yap\u0131lan de\u011fi\u015fiklikten etkilenmez.<\/span><\/span><\/p>\n<p align=\"JUSTIFY\"><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Hard limit de\u011ferini varsay\u0131lan 65536 de\u011ferinden 4096 de\u011ferine de\u011fi\u015ftirmek istersek a\u015fa\u011f\u0131daki komutu girmeliyiz.<\/span><\/span><\/p>\n<pre class=\"western\"># projmod -s -K \"process.max-file-descriptor=(priv,4096,deny)\" PRJ<\/pre>\n<p align=\"JUSTIFY\"><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Soft limit de\u011ferini varsay\u0131lan 256&#8217;dan 1024 de\u011ferine de\u011fi\u015ftirmek istersek a\u015fa\u011f\u0131daki komutu girmeliyiz.<\/span><\/span><\/p>\n<pre class=\"western\"><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\"># projmod -s -K \"process.max-file-descriptor=(basic,1024,deny) PRJ<\/span><\/span><\/pre>\n<p><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\"><b>limit\/ulimit komutlar\u0131:<\/b> limit ve ulimit komutlar\u0131 ile de bu ayarlar\u0131 yapabilirsiniz.<\/span><\/span><\/p>\n<p><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Soft limit de\u011ferini default 128&#8217;den 512 csh&#8217;da art\u0131rmaki\u00e7in a\u015fa\u011f\u0131daki komutu giriyoruz.<\/span><\/span><\/p>\n<pre class=\"western\"># limit descriptors 512<\/pre>\n<p align=\"JUSTIFY\"><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Soft limit de\u011ferini default 128&#8217;den 512 ksh&#8217; veya sh&#8217;da art\u0131rmaki\u00e7in a\u015fa\u011f\u0131daki komutu giriyoruz.<\/span><\/span><\/p>\n<pre class=\"western\"># ulimit -Sn 512<\/pre>\n<p align=\"JUSTIFY\"><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Hard limit de\u011ferini default 65536&#8217;dan 4096&#8217;ya csh&#8217;da azaltmak \u00e7in a\u015fa\u011f\u0131daki komutu giriyoruz.<\/span><\/span><\/p>\n<pre class=\"western\"># limit -h descriptors 4096<\/pre>\n<p align=\"JUSTIFY\"><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Hard limit de\u011ferini default 65536&#8217;dan 4096&#8217;ya ksh veya sh&#8217;da azaltmaki\u00e7in a\u015fa\u011f\u0131daki komutu giriyoruz.<\/span><\/span><\/p>\n<pre class=\"western\"># ulimit -Hn 4096<\/pre>\n<p align=\"JUSTIFY\"><strong><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\"><b>plimit komutu:<\/b><\/span><\/span><\/strong><strong><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\"> \u00d6nceden \u00e7al\u0131\u015fan bir i\u015flemin, \u0130\u015flem ba\u015f\u0131na a\u00e7\u0131k dosyalar\u0131n maksimum limitlerini plimit komtu ile de\u011fi\u015ftirebilirsiniz. \u00d6rne\u011fin 23159 numaral\u0131 i\u015flemin soft limitini 2048 hard limiti ise 4096 yapmak istersek a\u015fa\u011f\u0131daki komutu girmeniz yeterli ooacakt\u0131r.<\/span><\/span><\/strong><\/p>\n<pre class=\"western\"><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\"># plimit -n 2048,4096  23159<\/span><\/span><\/pre>\n<h4 class=\"western\"><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Ayr\u0131ca a\u015fa\u011f\u0131daki komutlar\u0131 girerek \u00e7al\u0131\u015fan bir i\u015flemin limit de\u011ferlerini kontrol edebilirsiniz.<\/span><\/span><\/h4>\n<pre class=\"western\"># <b>prctl<\/b> -n process.max-file-descriptor 23159 \r\nprocess: 23159: sleep 1200\r\nNAME    PRIVILEGE       VALUE    FLAG   ACTION               RECIPIENT\r\nprocess.max-file-descriptor\r\n        basic             256       -   deny                     23159\r\n        privileged      65.5K       -   deny                         -\r\n        system          2.15G     max   deny                         -\r\n# <b>plimit<\/b> 23159\r\n23159: sleep 1200\r\n   resource              current         maximum\r\n  time(seconds)         unlimited       unlimited\r\n  file(blocks)          unlimited       unlimited\r\n  data(kbytes)          unlimited       unlimited\r\n  stack(kbytes)         10240           unlimited\r\n  coredump(blocks)      unlimited       unlimited\r\n  nofiles(descriptors)  256             65536\r\n  vmemory(kbytes)       unlimited       unlimited\r\n# <b>pfiles<\/b> 23159 \r\n23159: sleep 1200\r\nCurrent rlimit: 256 file descriptors\r\n0: S_IFCHR mode:0620 dev:542,0 ino:500877638 uid:60004 gid:7 rdev:133,1\r\nO_RDWR\r\n\/dev\/pts\/1\r\noffset:38001\r\n1: S_IFCHR mode:0620 dev:542,0 ino:500877638 uid:60004 gid:7 rdev:133,1\r\nO_RDWR\r\n\/dev\/pts\/1\r\noffset:38001\r\n2: S_IFCHR mode:0620 dev:542,0 ino:500877638 uid:60004 gid:7 rdev:133,1\r\nO_RDWR\r\n\/dev\/pts\/1\r\noffset:38001<\/pre>\n<p><span style=\"font-family: Arial, sans-serif;\"><span style=\"font-size: small;\"><a href=\"http:\/\/bilgisayar.kocaeli.edu.tr\/files\/218_BOLUM12%20Dosya%20Sistemi.ppt\">A\u00e7\u0131k dosyalar (open files) ve dosya sistemi hakk\u0131nda teorik bilgiler i\u00e7in t\u0131klay\u0131n\u0131z.<\/a><\/span><\/span><\/p>\n<p>Kaynak: \u201cHow To Set The Limit For The Maximum Number Of Open Files Per Process In Solaris 10 And Solaris 11 (Doc ID 1408563.1)\u201d ba\u015fl\u0131kl\u0131 Oracle belgesi<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0130\u015flem ba\u015f\u0131na a\u00e7\u0131k dosyalar\u0131n maksimum limitleri hard limit ve soft limit de\u011ferleri ile s\u0131n\u0131rland\u0131r\u0131labilmektedir. Hard limit(\/etc\/system rlim_fd_max parametresi, process.max-file-descriptor ) sistem y\u00f6neticisi taraf\u0131ndan ayarlan\u0131r, herhangi bir kullan\u0131c\u0131 taraf\u0131ndan de\u011fer azalt\u0131labilir ama art\u0131r\u0131lamaz. Soft limit (\/etc\/system rlim_fd_cur parametresi, process.max-file-descriptor) ise herhangi bir kullan\u0131c\u0131 taraf\u0131ndan ayarlanabilir, hard limit de\u011ferininin \u00fczerine \u00e7\u0131kabilir. Solaris 10 ve 11&#8217;de Hard limit &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[8,10,66,65],"tags":[289,39,147,148,149,293,292,294,291,290,38],"class_list":["post-512","post","type-post","status-publish","format-standard","hentry","category-os","category-unix","category-veritabani","category-yazilim","tag-hard-limit","tag-oracle-solaris","tag-oracle-solaris-11-1","tag-oracle-solaris-11-2","tag-oracle-solaris-11-3","tag-process-max-file-descriptor","tag-projmod","tag-rlim_fd_cur","tag-rlim_fd_max","tag-soft-limit","tag-solaris10"],"jetpack_publicize_connections":[],"aioseo_notices":[],"views":2490,"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p7k56R-8g","jetpack-related-posts":[],"_links":{"self":[{"href":"http:\/\/www.bilisimonline.net\/index.php\/wp-json\/wp\/v2\/posts\/512"}],"collection":[{"href":"http:\/\/www.bilisimonline.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.bilisimonline.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.bilisimonline.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.bilisimonline.net\/index.php\/wp-json\/wp\/v2\/comments?post=512"}],"version-history":[{"count":4,"href":"http:\/\/www.bilisimonline.net\/index.php\/wp-json\/wp\/v2\/posts\/512\/revisions"}],"predecessor-version":[{"id":730,"href":"http:\/\/www.bilisimonline.net\/index.php\/wp-json\/wp\/v2\/posts\/512\/revisions\/730"}],"wp:attachment":[{"href":"http:\/\/www.bilisimonline.net\/index.php\/wp-json\/wp\/v2\/media?parent=512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.bilisimonline.net\/index.php\/wp-json\/wp\/v2\/categories?post=512"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.bilisimonline.net\/index.php\/wp-json\/wp\/v2\/tags?post=512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}