Using Linux/Unix as my development environment

Index » 喫茶店 (Koohii Lounge)

partner55083777 Member
From: Tokyo Registered: 2008-04-23 Posts: 397

ファブリス wrote:

Is it like Windows where technically it works without swap file, especially if you have lots of memory, but if you run the computer 24/24h it will run out of memory with some applications like MySQL server because of the way memory is released?

Sorry to double post, but I wanted to add one thing. 

For the most part, memory is managed very, very well on Linux.  It's very rare to ever get a program that just eats up all your memory and not be able to get it back.  I often get uptimes of 3+ months on Linux without any noticeable slowdown.

I'm not as familiar with Windows, but I was under the impression that current versions of Windows (maybe like Win7) also have really good memory management.  Do you find this not to be the case?

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

I read a swap file might be slower but I thought that was weird, I mean, are we talking old school Windows 95 optimization where one of the top tips of the day was to make a swap partition? I would have imagined that sort of optimization was no longer required, especially for Linux OS of all things. But maybe I'm wrong.

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

partner55083777 wrote:

I'm not as familiar with Windows, but I was under the impression that current versions of Windows (maybe like Win7) also have really good memory management.  Do you find this not to be the case?

It is the case, and it worked well enough for me with just 4GB but old programs and games (eg. Titan Quest) can refuse to run without a swap file.

Since I now have 16GB I spent a while trying to dig up a definite answer. I did find some reports that there still ARE issues in some particular environments or scenarios. Posters in this thread seemed to agree that for desktop/personal use it's fine but for sever software (eg. Sql) it can create problems:

I recently built a new workstation with 16GB, SSD and Windows 7. I disabled the pagefile. The machine is left on all the time.

During 10 days over the Christmas break, the idle PC started running out of virtual memory. The event log was filled with "Resource-Exhaustion-Detector" events pointing to the main culprit being SqlServer. Eventually the PC became unresponsive (even to remote connect in attempts) and needed a reboot.

I have now enabled a small "token pagefile" and have not had any problems since.

Source

The recommendation in this thread for a SSD user who has lots of memory was to *not* disable the page file, but create a small, fixed size swap file of 1-2 GB.

Computers running SQLServer (non-express versions) absolutely require a page file.

The way it works, it will use the maximum amount of memory it can, up to your configured maximum, and will only release it if the system comes under memory pressure.

However, I've found that SQLServer cannot release memory quick enough under pressure situations, so random software gets killed when memory runs out.

Having a small pagefile buffers the memory pressure, giving SQLServer a little bit of time to release memory.

Source (same thread)

Advertising (register and sign in to hide this)
JapanesePod101 Sponsor
 
shinsen Member
Registered: 2009-02-18 Posts: 181

ファブリス wrote:

So shinsen, do you use a WD RE4 drive? I've got a 1TB version and there is no way this thing uses "advanced acoustics which minimize noise". Wow, it's very noisy.

No, I don't own one myself. Strange, but customer reviews of WD1003FBYX on Newegg describe the drive as quiet, very quiet, extremely quiet. There is even one unhappy customer who got 2 DOA drives out of 3 ordered but he still says the drives are "very quiet". I'm not sure why yours is noisy.

About linux swap partition - I recommend making one. You can hide it in Windows as described here.

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

Thanks maybe I have a defective model. I'll try again in SATA2 instead of SATA3 just in case.

Unfortunately my particular model (WD1003FBYX-01Y7B1) does not support AAM.

chamcham Member
Registered: 2005-11-11 Posts: 1444

Like someone else suggested, I'd get as much RAM as possible.

shadysaint Member
From: Pennsylvania Registered: 2008-09-07 Posts: 88

One of the many beautiful things about Linux is the amount of control you can exercise.  For example, you can change kernel parameters such as swappiness on a running system.  Swappiness is the parameter than controls how aggressively the memory management system is with swapping memory.  Most distributions ship with this value set too high because there are a lot of people with older hardware, i.e. not a lot of ram.  With 16 GB of ram, you might as well set it to 0:

sysctl -w vm.swappiness=0

(this has to be done as root or with sudo)

Also, I've never had any memory issues with mysql server running for months at a time.

partner55083777 Member
From: Tokyo Registered: 2008-04-23 Posts: 397

ファブリス wrote:

I read a swap file might be slower but I thought that was weird, I mean, are we talking old school Windows 95 optimization where one of the top tips of the day was to make a swap partition? I would have imagined that sort of optimization was no longer required, especially for Linux OS of all things. But maybe I'm wrong.

You're probably right.  I would recommend a swap partition or a swap file just because you're likely to run into less problems if you have a system with swap space, since most Linux installations have swap space.  However, I'm sure there are tons of systems that don't have any swap space (embedded systems?), so you'll almost certainly be fine either way.

Also, shadysaint has good advice about playing with the swappiness.

Once again, if you're worried, it really wouldn't hurt anything to have a 1 or 2 gb swap file.  However you'll probably be fine without it.

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

shinsen wrote:

I think you should at least consider a hackintosh, it really sounds like it would be your best option. I have a multiboot PC with Windows 7, Linux Mint and OS X and I use OS X on it 99% of the time. It's Unix, it's pretty, it's stable, it runs Bash and Photoshop.
(...)
Also, I would recommend not getting a "k" version of Intel CPU (you'll probably get an i7, I'm guessing). The "k" CPUs are for the gaming and overclocking market but they lack certain virtualization features (such as Vt-d) that VMs can benefit from.

Thanks again shinsen!! I'm posting from OS X Mountain Lion smile  That's so friggin' awesome!

It's funny because I expected something familiar and I still end up relearning now since I upgraded with Mountain Lion tongue  (which I *bought* on the Apple Store in case anyone wonders...).

Regarding virtualization there is an option for "Intel Virtualization Technology" in the Gigabyte Z77X-UD5H bios. Strangely not activated by default.

I'm really happy with the *looks* of the Corsair case too... but having not built a PC in several years I didn't expect it to come with a grill on the top and large 200mm fans on top and front of the case. I'll have to cut out the front mesh (it's still covered by another removable dust filter) which causes noise with the front fan (a well known issue with the Corsair 650D apparently). I'm also getting a CPU Cooler in the end, because the "adaptive" RPM on the Intel stock cooler can be distracting, as it's a little high pitched. I also need it so it helps blow the hot air from the GPU towards the grill and fan at the back of the case.

Interestingly there is a boot menu on the UEFI so technically I could boot into each OS with that alone, only it's a bugger to use as you never know when it'll register the DEL or F12 key at boot time, and you end up mashing that key repeatedly to make sure you enter the UEFI or boot menu tongue

Good times good times... still lots of work to reduce the fan noise in the case, and reinstall everything in OS X >_>

shinsen Member
Registered: 2009-02-18 Posts: 181

Awesome, glad to hear about your success with the OS X install! Remember to backup. If you're looking for a cheap way to quiet your fans you can use resistor cables. I use them on my 120mm fans in the front and back. Maybe you could use one for your CPU cooler.

http://ep.yimg.com/ca/I/outletpc_2225_312550358

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

I have a question for Mountain Lion which I assume you're using.. it's kinda hard to find an answer on Google:

I used to press Cmd + <tilde key> (` or @ on Azerty) to switch between windows of the same application. This is super handy for me for switching between two tab groups in Chrome, or Vim.

I can't find a way to do this in ML sad  I went into the Keyboard Shortcuts Preferences pane, and set the shortcut for "Move focus to next window". I see two similar options and neither of them work as it did in Snow Leopard: they switch between all windows regardless of the application.

Searching on Google... it seems this behaviour is what a lot of people prefer, and maybe that's why it was made default in ML. Do you know per chance of a way to change this window switch behaviour so it works per application?

shinsen Member
Registered: 2009-02-18 Posts: 181

ファブリス wrote:

I used to press Cmd + <tilde key> (` or @ on Azerty) to switch between windows of the same application. This is super handy for me for switching between two tab groups in Chrome, or Vim.

I can't find a way to do this in ML sad  I went into the Keyboard Shortcuts Preferences pane, and set the shortcut for "Move focus to next window". I see two similar options and neither of them work as it did in Snow Leopard: they switch between all windows regardless of the application.

I'm using Lion because I didn't see a reason to update yet and I'm happy with my current setup. About your question here is a 10.8 user that seems to have resolved the issue - link.

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

Ah, ok. I saw that page:

Check in System Preferences > Keyboard > Keyboard Shortcuts > Keyboard & Text Input and make sure that "Move focus to next window in application" is checked.

This switches between all open application windows. It doesn't switch between the current application's windows. *shakes fist at Apple*

chamcham Member
Registered: 2005-11-11 Posts: 1444

ファブリス wrote:

Ah, ok. I saw that page:

Check in System Preferences > Keyboard > Keyboard Shortcuts > Keyboard & Text Input and make sure that "Move focus to next window in application" is checked.

This switches between all open application windows. It doesn't switch between the current application's windows. *shakes fist at Apple*

http://www.techiecorner.com/230/how-to- … -mac-os-x/

smile

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

Yeah I know the shortcut as I described above... it doesn't seem to work anymore in Mountain Lion. According to one comment on that page you linked, "Doesn’t work anymore in Lion. What’s the new shortcut?"... it would seem that shortcut was also no longer working by default in Lion. I was using Snow Leopard (10.6.x). This may be related to the changes to "Exposé" / "Mission Control" (which I never use).

shinsen Member
Registered: 2009-02-18 Posts: 181

It works for me in Lion.

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

Switching between windows *of the current active application*?

EDIT: Here a superuser question with a screenshot confirms the behaviour I was used to in Snow Leopard, with the shortcut "Move focus to next window in application":

http://superuser.com/questions/205644/o … pplication

Hooooorayyy happinesssssss!! The behaviour I wanted was renamed to "Move focus to next window". Only I had set the same key combination for both window switching shortcuts, and while the first one was disabled (un-checked), it wouldn't allow the second one to work. Silly Apple.

shinsen Member
Registered: 2009-02-18 Posts: 181

ファブリス wrote:

Hooooorayyy happinesssssss!! The behaviour I wanted was renamed to "Move focus to next window".

I looked at my settings and that's exactly what it's called in Lion. If I had thought of looking at my preferences pane earlier maybe you would have had your answer sooner smile

Another way to switch windows is to press Ctrl + Down Arrow. There will be a screen with all windows of the application. You can then use the arrow keys or just click to select your window. Useful when you have many windows of one app.

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

Another quickie: so after doing a full clone backup of either Windows 7 or OS X these partitions should appear on Chameleon or Chimera right?

I'd want to boot into them once to double-check the backup worked, and then later I suppose I can hide them from Chameleon.

shinsen Member
Registered: 2009-02-18 Posts: 181

ファブリス wrote:

Another quickie: so after doing a full clone backup of either Windows 7 or OS X these partitions should appear on Chameleon or Chimera right?

I'd want to boot into them once to double-check the backup worked, and then later I suppose I can hide them from Chameleon.

Yep, in Chameleon Wizard that I use there is a "Default partition" that you can use to change what partition will boot by default and also the "Hide partition" input box where you enter the partitions you want to hide.

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

Thanks. It makes much more sense now that I found the /Extra/ folder with the bootloader plist and themes.

Did you get a "System Reserved" partition with Windows? It's still unclear to me whether I can delete it or not. Some people say you can, but the bootloader wants the "System Reserved" partition selected to boot Windows. Hmm.

shinsen Member
Registered: 2009-02-18 Posts: 181

ファブリス wrote:

Did you get a "System Reserved" partition with Windows?

No, I don't have that partition. Possibly because I installed Windows onto an existing partition scheme.

Try this http://www.geekshangout.com/node/103

ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

Thanks, your Google-fu is better than mine :p

What's wrong with you Apple? Thank God someone made a patch to restore coloured icons in the Finder sidebar, works like a charm smile
http://macmatrix.blogspot.hu/p/sideeffects.html

Reply #99 - 2012 October 01, 5:26 pm
shinsen Member
Registered: 2009-02-18 Posts: 181

ファブリス, I know someone who's looking for a good PHP programmer, maybe you'd be interested? I don't know the details but if you'd like to talk to them I could hook you up. All I know is they have their own engine they use to create custom solutions for high traffic sites (I think over 150,000 visitors/day if I remember correctly). They use PHP with MySQL/Oracle. I play airsoft with them on Saturdays.

Reply #100 - 2012 October 01, 5:42 pm
ファブリス Administrator
From: Belgium Registered: 2006-06-14 Posts: 4021 Website

I'm good thanks! I don't have much experience with high traffic sites either to be honest (I'm more into front end development than back end stuff).